Akshitha1 commited on
Commit
2dabf91
·
verified ·
1 Parent(s): 69a52fc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -18
Dockerfile CHANGED
@@ -1,24 +1,9 @@
1
- FROM python:3.9-slim
2
 
3
- # Set working directory
4
  WORKDIR /app
5
 
6
- # Copy requirement files
7
- COPY requirements.txt .
8
-
9
- # Install dependencies
10
- RUN pip install --no-cache-dir -r requirements.txt
11
-
12
- # Copy the rest of the code
13
  COPY . .
14
 
15
- # Expose port (Spaces expects 7860 or 5000)
16
- EXPOSE 7860
17
-
18
- # Set environment variable for Flask
19
- ENV FLASK_APP=app.py
20
- ENV FLASK_RUN_PORT=7860
21
- ENV FLASK_RUN_HOST=0.0.0.0
22
 
23
- # Run the Flask app
24
- CMD ["flask", "run"]
 
1
+ FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
5
  COPY . .
6
 
7
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
8
 
9
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]