Pulastya0 commited on
Commit
fcd4851
·
verified ·
1 Parent(s): 9c7af28

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -20
Dockerfile CHANGED
@@ -1,20 +1,18 @@
1
- # Base image
2
- FROM python:3.11-slim
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Copy requirements
8
- COPY requirements.txt .
9
-
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Copy app.py
14
- COPY . .
15
-
16
- # Expose port
17
- EXPOSE 7860
18
-
19
- # Run FastAPI server
20
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use official slim Python image
2
+ FROM python:3.11-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Copy requirements and install
8
+ COPY requirements.txt .
9
+ RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy app.py
12
+ COPY . .
13
+
14
+ # Expose default HF port
15
+ EXPOSE 7860
16
+
17
+ # Use Python to run uvicorn (avoids PATH issues)
18
+ CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]