Image-annotation-tool / Dockerfile
Sandeshsandy's picture
your-space/ β”œβ”€ Dockerfile β”œβ”€ backend/ β”‚ β”œβ”€ main.py β”‚ └─ requirements.txt └─ frontend/ └─ build/
17fe9d0 verified
raw
history blame contribute delete
580 Bytes
# ---- 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"]