thechaiexperiment commited on
Commit
9e47f21
·
1 Parent(s): 3fc4b10

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -34,6 +34,9 @@ ENV HF_HOME=/code/transformers_cache
34
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
35
  RUN python -c "from sentence_transformers import CrossEncoder; CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')"
36
 
 
 
 
37
  # Copy your application code into the container
38
  COPY . .
39
 
@@ -45,4 +48,3 @@ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
45
 
46
  # Set environment variable for cache location
47
  ENV TRANSFORMERS_CACHE=/code/transformers_cache
48
-
 
34
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
35
  RUN python -c "from sentence_transformers import CrossEncoder; CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')"
36
 
37
+ # Fix permissions for the entire cache and model directories to ensure all subdirectories are writable
38
+ RUN chmod -R 777 /code/transformers_cache
39
+
40
  # Copy your application code into the container
41
  COPY . .
42
 
 
48
 
49
  # Set environment variable for cache location
50
  ENV TRANSFORMERS_CACHE=/code/transformers_cache