Spaces:
Sleeping
Sleeping
# 1) Start from a small Python base | |
FROM python:3.11-slim | |
# 2) Upgrade pip, setuptools, wheel (avoids old‐pip bugs) | |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel | |
# 3) Set the working dir | |
WORKDIR /app | |
# 4) Copy your entire repo into the container | |
COPY . . | |
# 5) Install your local package from src/ first | |
# (assumes src/ has a setup.py or pyproject.toml at its root) | |
RUN pip install --no-cache-dir ./src | |
# 6) Now install all the other deps | |
RUN pip install --no-cache-dir -r requirements.txt | |
# 7) Expose the port your app uses | |
EXPOSE 5001 | |
# 8) Launch FastAPI via Uvicorn | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5001"] | |