Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
WORKDIR /app
|
| 6 |
RUN chmod -R 777 /app
|
|
@@ -19,10 +23,8 @@ PY
|
|
| 19 |
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
# ✅ Create writable data directory
|
| 25 |
-
RUN mkdir -p /app/data && chmod -R 777 /app/data
|
| 26 |
|
| 27 |
EXPOSE 7860
|
| 28 |
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
+
# Use a writable Hugging Face cache dir inside /app
|
| 4 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
+
PIP_NO_CACHE_DIR=1 \
|
| 6 |
+
PORT=7860 \
|
| 7 |
+
HF_HOME=/app/cache/huggingface
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
RUN chmod -R 777 /app
|
|
|
|
| 23 |
|
| 24 |
COPY . .
|
| 25 |
|
| 26 |
+
# ✅ Create writable data and Hugging Face cache directories
|
| 27 |
+
RUN mkdir -p /app/data /app/cache/huggingface && chmod -R 777 /app/data /app/cache/huggingface
|
|
|
|
|
|
|
| 28 |
|
| 29 |
EXPOSE 7860
|
| 30 |
|