Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 713 Bytes
3bfd80a 5354ca9 cd1dff0 5354ca9 3bfd80a 729c711 3bfd80a cd1dff0 5354ca9 cdc237b cd1dff0 5354ca9 cd1dff0 5354ca9 cd1dff0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | FROM python:3.12-slim
WORKDIR /app/env
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git curl libgomp1 cmake ninja-build g++ gfortran \
libnetcdf-dev libnetcdff-dev && \
rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir \
constellaration \
"fastapi>=0.115.0" \
"numpy>=2.0.0" \
"openenv-core[core]>=0.2.1" \
"pydantic>=2.10.0" \
"uvicorn>=0.34.0"
COPY . /app/env
ENV PYTHONPATH="/app/env"
ENV ENABLE_WEB_INTERFACE=true
EXPOSE 8000
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]
|