| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| FROM python:3.12-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| gcc g++ \ |
| libgeos-dev \ |
| libproj-dev \ |
| libffi-dev \ |
| curl \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ |
| && apt-get install -y --no-install-recommends nodejs \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY frontend/package.json frontend/package-lock.json* frontend/ |
| RUN cd frontend && npm ci |
| COPY frontend/ frontend/ |
| RUN cd frontend && npm run build |
|
|
| |
| COPY pyproject.toml . |
| COPY src/ src/ |
| COPY main.py . |
| COPY web/ web/ |
| COPY tests/ tests/ |
| COPY scripts/ scripts/ |
| COPY assets/ assets/ |
| COPY README.md LICENSE ./ |
|
|
| |
| RUN pip install --no-cache-dir -e ".[agent,web]" |
|
|
| |
| RUN mkdir -p /app/data/plots /app/.memory /app/logs |
|
|
| |
| RUN python -c "import cartopy; cartopy.io.shapereader.natural_earth(resolution='110m', category='physical', name='coastline')" \ |
| && python -c "import cartopy; cartopy.io.shapereader.natural_earth(resolution='50m', category='physical', name='coastline')" \ |
| && python -c "import cartopy; cartopy.io.shapereader.natural_earth(resolution='110m', category='physical', name='land')" \ |
| && python -c "import cartopy; cartopy.io.shapereader.natural_earth(resolution='50m', category='physical', name='land')" |
|
|
| |
| |
| RUN python -c "\ |
| import langchain; \ |
| import langchain_openai; \ |
| import arraylake; \ |
| import icechunk; \ |
| import xarray; \ |
| import scipy; \ |
| import matplotlib; \ |
| import scgraph; \ |
| print('All heavy modules pre-imported successfully')" |
|
|
| |
| ENV MPLBACKEND=Agg |
| |
| ENV PYTHONUNBUFFERED=1 |
|
|
| EXPOSE 7860 |
| CMD ["uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|