diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4393c31c..b262cf51 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,7 +73,6 @@ jobs: - name: Install system dependencies run: >- sudo apt-get install --no-install-recommends --yes \ - libgdal-dev \ libproj-dev - name: Checkout repository diff --git a/bats_ai/settings/base.py b/bats_ai/settings/base.py index 1a7e4244..c18d60f7 100644 --- a/bats_ai/settings/base.py +++ b/bats_ai/settings/base.py @@ -6,6 +6,7 @@ from django.core.exceptions import ImproperlyConfigured import django_stubs_ext from environ import Env +import osgeo from resonant_settings.allauth import * from resonant_settings.celery import * from resonant_settings.django import * @@ -123,3 +124,6 @@ 'schedule': 86400, # every 24 hours (in seconds) }, } + +GDAL_LIBRARY_PATH = osgeo.GDAL_LIBRARY_PATH +GEOS_LIBRARY_PATH = osgeo.GEOS_LIBRARY_PATH diff --git a/dev/django.Dockerfile b/dev/django.Dockerfile index a9567edc..5d4956fd 100644 --- a/dev/django.Dockerfile +++ b/dev/django.Dockerfile @@ -20,9 +20,7 @@ RUN set -ex \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ gcc \ g++ \ - libgdal36 \ libc6-dev \ - libpq-dev \ libsndfile1-dev \ ca-certificates \ && apt-get clean \ diff --git a/prod/django.Dockerfile b/prod/django.Dockerfile index 1bed6483..fdfe3710 100644 --- a/prod/django.Dockerfile +++ b/prod/django.Dockerfile @@ -12,8 +12,6 @@ RUN set -ex \ gcc \ g++ \ libc6-dev \ - libgdal36 \ - libgdal-dev \ libsndfile1-dev \ ca-certificates \ && apt-get clean \ diff --git a/pyproject.toml b/pyproject.toml index 6f24774a..2565979c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ dependencies = [ "opencv-python-headless", "tqdm", # guano metadata + "gdal", "guano", "django_celery_results", # Production-only @@ -111,6 +112,14 @@ constraint-dependencies = [ "numba >= 0.61.0", ] +[[tool.uv.index]] +name = "large_image_wheels" +url = "https://girder.github.io/large_image_wheels/" +explicit = true + +[tool.uv.sources] +gdal = { index = "large_image_wheels" } + [tool.black] line-length = 100 skip-string-normalization = true diff --git a/uv.lock b/uv.lock index 896e53b8..319d3a5e 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.10" resolution-markers = [ "python_full_version >= '3.13' and sys_platform == 'darwin'", @@ -174,6 +174,7 @@ dependencies = [ { name = "django-s3-file-field", extra = ["minio", "s3"] }, { name = "django-storages", extra = ["s3"] }, { name = "django-stubs-ext" }, + { name = "gdal" }, { name = "geopandas" }, { name = "guano" }, { name = "gunicorn" }, @@ -259,6 +260,7 @@ requires-dist = [ { name = "django-storages", extras = ["s3"] }, { name = "django-stubs-ext" }, { name = "faker", marker = "extra == 'development'" }, + { name = "gdal", index = "https://girder.github.io/large_image_wheels/" }, { name = "geopandas", specifier = ">=1.1.1" }, { name = "guano" }, { name = "gunicorn" }, @@ -1319,6 +1321,27 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d7/d4/1d85a1996b6188cd2713230e002d79a6f3a289bb17cef600cba385848b72/fonttools-4.58.5-py3-none-any.whl", hash = "sha256:e48a487ed24d9b611c5c4b25db1e50e69e9854ca2670e39a3486ffcd98863ec4", size = 1115318, upload-time = "2025-07-03T14:04:45.378Z" }, ] +[[package]] +name = "gdal" +version = "3.12.1.1" +source = { registry = "https://girder.github.io/large_image_wheels/" } +wheels = [ + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:8bd66918540434262985e7a6745367a3d6d18409cf4673149d5be28745bfed11" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:9dce145f7e7ae8d9b3e980c7d08fbb1ce5fabd3293879b6c490d430b92956683" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:cc1020c17be2f0d6bbf1c4892dd36a890856a5c710727335626a4bff05ce5529" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:92bfaa925cf9f913d991df69c02cd2021e2d61a3c0f8330ebca6d83f0ad42ce2" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:34769d3f79b76561eee9e8eacdecf79131cf88ccc72c0b1b275867af62b2abed" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:2440bce97729ce434e5fbd6d37cffb53d98ad2c49f51b25b5db55f637045c517" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:598562f34805716765fd31052b64c3478baf692f4f382c57aa51798d41ffc0d3" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:cbfdcc300ab28c381128b7672b4386c5fdd774dd3793f5d6dd20f6627bd6afa3" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:5a85e1cf4b067ac7a502c393c05e207d629e07807e70336a82789c206b24282f" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:5f567950a814c24c9edb861de0540dab6a928cc264d663ddf56bb78f6fb8ad52" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:7f13cff39e9dd7455ae3ab65339cb51a8ac286514253fb5da1e4f676e9a8c74b" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:08bdf5e832cc35b71a0dd68e2d28df86840eff90a1c7ea771eaa83388d158b77" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:c2ac108b260842af1876b96b88ceb750349753c7f3770190ab8392ff7bafd51d" }, + { url = "https://github.com/girder/large_image_wheels/raw/wheelhouse/GDAL-3.12.1.1-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:a7aa3272f4d36425150f0fbf3a162bb3dbbb662041f4a9af9c4f6cc826077906" }, +] + [[package]] name = "geopandas" version = "1.1.1"