Emeritus-21 commited on
Commit
fcaf83c
·
verified ·
1 Parent(s): a35719d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy requirements from backend folder
6
+ COPY backend/requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Copy all code from backend folder
10
+ COPY backend/ .
11
+
12
+ # Hugging Face Docker Spaces use port 7860
13
+ ENV PORT=7860
14
+ EXPOSE 7860
15
+
16
+ # Start FastAPI
17
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]