thechaiexperiment commited on
Commit
fe819e8
·
1 Parent(s): 6209c8b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -23,12 +23,13 @@ ENV NLTK_DATA=/code/nltk_data
23
  # Download punkt data for NLTK
24
  RUN python -c "import nltk; nltk.download('punkt')"
25
 
26
- # Ensure the transformer cache directory exists
27
- RUN mkdir -p /code/transformers_cache
28
  ENV TRANSFORMERS_CACHE=/code/transformers_cache
29
 
30
  # Download the sentence-transformers model to avoid recreating it
31
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
 
32
 
33
  # Copy your code and models
34
  COPY . .
 
23
  # Download punkt data for NLTK
24
  RUN python -c "import nltk; nltk.download('punkt')"
25
 
26
+ # Ensure the transformer cache directory exists and set correct permissions
27
+ RUN mkdir -p /code/transformers_cache && chmod -R 777 /code/transformers_cache
28
  ENV TRANSFORMERS_CACHE=/code/transformers_cache
29
 
30
  # Download the sentence-transformers model to avoid recreating it
31
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
32
+ RUN python -c "from sentence_transformers import CrossEncoder; CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')"
33
 
34
  # Copy your code and models
35
  COPY . .