saad1BM commited on
Commit
9697672
·
verified ·
1 Parent(s): b48462b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -17
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- # Requirements install karein
6
- COPY requirements.txt .
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- # Saara code copy karein
10
- COPY . .
11
-
12
- # PERMISSION FIX: Hugging Face user ko permissions dena
13
- RUN chmod -R 777 /app
14
-
15
- # Port 7860 Hugging Face ke liye standard hai
16
- EXPOSE 7860
17
-
 
 
 
 
18
  CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Requirements install karein
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Saara code copy karein
10
+ COPY . .
11
+
12
+ # PATH FIX: Python ko batana ke /app mein modules hain
13
+ ENV PYTHONPATH=/app
14
+
15
+ # PERMISSION FIX: Hugging Face user ko permissions dena
16
+ RUN chmod -R 777 /app
17
+
18
+ # Port 7860 Hugging Face ke liye standard hai
19
+ EXPOSE 7860
20
+
21
+ # Command: api folder ke andar main.py dhoondo
22
  CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]