Spaces:
Build error
Build error
your-space/ ββ Dockerfile ββ backend/ β ββ main.py β ββ requirements.txt ββ frontend/ ββ build/
17fe9d0 verified | # ---- Base image ---- | |
| FROM python:3.10-slim | |
| # ---- System deps (optional but useful) ---- | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ---- Working directory ---- | |
| WORKDIR /app | |
| # ---- Backend ---- | |
| COPY backend/ backend/ | |
| RUN pip install --no-cache-dir -r backend/requirements.txt | |
| # ---- Frontend (already built locally) ---- | |
| COPY frontend/build frontend/build | |
| # ---- Hugging Face Spaces expects port 7860 ---- | |
| EXPOSE 7860 | |
| # ---- Start app ---- | |
| CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"] | |