pleonova commited on
Commit
7a8b830
·
verified ·
1 Parent(s): c1731ea

Update your Dockerfile to include an ENV directive that ensures the Hugging Face cache directory is writable

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -0
Dockerfile CHANGED
@@ -10,6 +10,12 @@ COPY . .
10
  # Install Python dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
 
 
 
 
 
13
  # Expose the port your app will run on
14
  EXPOSE 7860
15
 
 
10
  # Install Python dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Create a writable cache directory for Hugging Face models
14
+ RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
15
+
16
+ # Set an environment variable for the cache directory
17
+ ENV TRANSFORMERS_CACHE=/app/.cache
18
+
19
  # Expose the port your app will run on
20
  EXPOSE 7860
21