Spaces:
Sleeping
Sleeping
File size: 582 Bytes
4918986 7ec456b 4918986 a312926 | 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 | # 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}"]
|