ecmwf_forcast_codex / Dockerfile
nakas's picture
Switch to real ECMWF Open Data (IFS HRES sfc GRIB), add ecCodes + caching; fallback to Open‑Meteo if unavailable
7ec456b
raw
history blame contribute delete
582 Bytes
# syntax=docker/dockerfile:1
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# System deps (optional: gcc for any wheels if needed)
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libeccodes0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY app ./app
ENV PORT=7860
EXPOSE 7860
# Use shell form so $PORT expands at runtime
CMD ["sh", "-c", "python -m uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860}"]