Sandeshsandy commited on
Commit
17fe9d0
·
verified ·
1 Parent(s): b585168

your-space/ ├─ Dockerfile ├─ backend/ │ ├─ main.py │ └─ requirements.txt └─ frontend/ └─ build/

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ---- Base image ----
2
+ FROM python:3.10-slim
3
+
4
+ # ---- System deps (optional but useful) ----
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ curl \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # ---- Working directory ----
11
+ WORKDIR /app
12
+
13
+ # ---- Backend ----
14
+ COPY backend/ backend/
15
+ RUN pip install --no-cache-dir -r backend/requirements.txt
16
+
17
+ # ---- Frontend (already built locally) ----
18
+ COPY frontend/build frontend/build
19
+
20
+ # ---- Hugging Face Spaces expects port 7860 ----
21
+ EXPOSE 7860
22
+
23
+ # ---- Start app ----
24
+ CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]