swayamshetkar commited on
Commit
296e866
·
verified ·
1 Parent(s): ac5d556

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -14
Dockerfile CHANGED
@@ -1,14 +1,18 @@
1
- # Dockerfile (optional)
2
- FROM python:3.11-slim
3
-
4
- WORKDIR /app
5
-
6
- COPY requirements.txt .
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- COPY . .
10
-
11
- ENV PYTHONUNBUFFERED=1
12
- EXPOSE 8080
13
-
14
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
 
 
 
 
 
1
+ # Use official Python image
2
+ FROM python:3.11-slim
3
+
4
+ # Set work directory
5
+ WORKDIR /app
6
+
7
+ # Install dependencies
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy backend code
12
+ COPY app.py .
13
+
14
+ # Expose port 7860 (HF expects this, even for FastAPI)
15
+ EXPOSE 7860
16
+
17
+ # Run FastAPI server
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]