Update Dockerfile
Browse files- 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 |
-
#
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
#
|
| 16 |
-
|
| 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"]
|