| |
| FROM python:3.11-slim AS builder |
|
|
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| libgeos-dev \ |
| libproj-dev \ |
| proj-data \ |
| proj-bin \ |
| g++ \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| |
| |
| RUN pip install --no-cache-dir --only-binary :all: \ |
| numpy scipy matplotlib geopandas shapely pyproj rioxarray xarray \ |
| && pip install --no-cache-dir --prefer-binary cartopy |
|
|
| |
| RUN mkdir -p /root/.local/share/cartopy && \ |
| python -c "import cartopy.io.shapereader as s; [s.natural_earth(resolution='50m', category=c, name=n) for c, n in [('physical','land'),('physical','ocean'),('physical','coastline'),('cultural','admin_0_boundary_lines_lake')]]" \ |
| || echo "Natural Earth download skipped β Cartopy will use defaults" |
|
|
| |
| RUN pip install --no-cache-dir --prefer-binary \ |
| "fastapi>=0.110.0" \ |
| "uvicorn[standard]>=0.27.0" \ |
| "aiosqlite>=0.20.0" \ |
| "pydantic>=2.6.0" \ |
| "httpx>=0.27.0" \ |
| "pystac-client>=0.7.0" \ |
| "stackstac>=0.5.0" \ |
| "reportlab>=4.1.0" \ |
| "tqdm>=4.66.0" \ |
| "planetary-computer>=1.0.0" \ |
| "openeo>=0.28.0" \ |
| "anthropic>=0.40.0" \ |
| "rasterio>=1.3.0" |
|
|
| |
| FROM python:3.11-slim |
|
|
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| libgeos-c1v5 \ |
| libproj25 \ |
| libexpat1 \ |
| proj-data \ |
| proj-bin \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages |
| COPY --from=builder /usr/local/bin /usr/local/bin |
| COPY --from=builder /root/.local/share/cartopy /root/.local/share/cartopy |
|
|
| WORKDIR /app |
|
|
| |
| COPY pyproject.toml . |
| COPY app/ app/ |
| RUN pip install --no-cache-dir --no-deps . |
|
|
| COPY frontend/ frontend/ |
|
|
| RUN mkdir -p data results |
|
|
| EXPOSE 7860 |
|
|
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|