Spaces:
Runtime error
Runtime error
| FROM python:3.11-slim | |
| # rasterio's bundled GDAL wheel needs libexpat at runtime (not in python:slim). | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates libexpat1 && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # app.py (static mount) + data/ (STAC catalog + MosaicJSON, served same-origin) | |
| COPY app.py . | |
| COPY data ./data | |
| # GDAL /vsicurl tuning for cheap COG range reads over HTTPS. | |
| ENV GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR \ | |
| GDAL_HTTP_MULTIRANGE=YES \ | |
| GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES \ | |
| CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif \ | |
| VSI_CACHE=TRUE \ | |
| GDAL_CACHEMAX=200 \ | |
| PORT=8000 | |
| EXPOSE 8000 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |