Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -2
Dockerfile
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 1 |
-
FROM python:3.9
|
|
|
|
| 2 |
WORKDIR /code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
COPY requirements.txt .
|
| 4 |
RUN pip install -r requirements.txt
|
|
|
|
| 5 |
COPY . .
|
| 6 |
-
|
|
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
+
|
| 3 |
WORKDIR /code
|
| 4 |
+
|
| 5 |
+
# Create cache directory with correct permissions
|
| 6 |
+
RUN mkdir -p /cache && chmod 777 /cache
|
| 7 |
+
ENV HF_HOME=/cache
|
| 8 |
+
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install -r requirements.txt
|
| 11 |
+
|
| 12 |
COPY . .
|
| 13 |
+
|
| 14 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|