Jofthomas commited on
Commit
511ad2d
·
verified ·
1 Parent(s): 5b9a69f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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