Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -0
Dockerfile
CHANGED
@@ -19,6 +19,15 @@ RUN pip install --no-cache-dir --upgrade pip && \
|
|
19 |
# Copy the rest of the application code into the container
|
20 |
COPY . .
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Expose the port the app runs on
|
23 |
# This informs Docker that the container listens on this port
|
24 |
EXPOSE 7860
|
|
|
19 |
# Copy the rest of the application code into the container
|
20 |
COPY . .
|
21 |
|
22 |
+
# ---- ADD THIS LINE ----
|
23 |
+
# Set environment variables for Hugging Face cache directories
|
24 |
+
# Use directories within /app where the user has write permissions.
|
25 |
+
ENV HF_HOME=/app/.cache/huggingface
|
26 |
+
ENV HF_DATASETS_CACHE=/app/.cache/datasets
|
27 |
+
# Alternatively, just HF_DATASETS_CACHE might be enough if only datasets are used.
|
28 |
+
# Using HF_HOME covers models, datasets, etc.
|
29 |
+
# ---- END OF ADDED LINE ----
|
30 |
+
|
31 |
# Expose the port the app runs on
|
32 |
# This informs Docker that the container listens on this port
|
33 |
EXPOSE 7860
|