dhani10 commited on
Commit
4820377
·
verified ·
1 Parent(s): 629daf2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -19
Dockerfile CHANGED
@@ -1,30 +1,17 @@
1
 
2
- # FROM python:3.9-slim
3
-
4
- # WORKDIR /app
5
-
6
- # # Install system dependencies
7
- # RUN apt-get update && \
8
- # apt-get install -y gcc libgomp1 && \
9
- # rm -rf /var/lib/apt/lists/*
10
-
11
- # COPY requirements.txt .
12
- # RUN pip install --no-cache-dir -r requirements.txt
13
-
14
- # COPY random_forest_best_model.pkl .
15
- # COPY app.py .
16
-
17
- # CMD ["python", "app.py"]
18
-
19
- FROM python:3.9
20
 
21
  WORKDIR /app
22
 
23
  COPY requirements.txt .
24
- RUN pip install -r requirements.txt
25
 
26
  COPY . .
27
 
 
28
  EXPOSE 7860
29
 
 
30
  CMD ["python", "app.py"]
 
 
1
 
2
+ # Dockerfile
3
+ FROM python:3.9-slim
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  WORKDIR /app
6
 
7
  COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
 
10
  COPY . .
11
 
12
+ # Hugging Face Spaces expect app to listen on port 7860
13
  EXPOSE 7860
14
 
15
+ # This ensures your app reads PORT from env (which Hugging Face sets to 7860)
16
  CMD ["python", "app.py"]
17
+