mojad121 commited on
Commit
d8b9009
·
verified ·
1 Parent(s): 3786f3a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -14,14 +14,15 @@ COPY src/ ./src/
14
 
15
  RUN pip3 install -r requirements.txt
16
 
17
- # Set cache directory to avoid permission issues during model download
 
 
 
 
18
  ENV TRANSFORMERS_CACHE=/app/cache
19
  ENV HF_HOME=/app/cache
20
  ENV SENTENCE_TRANSFORMERS_HOME=/app/cache
21
 
22
- # Create the cache directory
23
- RUN mkdir -p /app/cache
24
-
25
  EXPOSE 8501
26
 
27
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
14
 
15
  RUN pip3 install -r requirements.txt
16
 
17
+ # Create safe cache folders
18
+ RUN mkdir -p /app/cache && chmod -R 777 /app/cache
19
+ RUN mkdir -p /.streamlit && chmod -R 777 /.streamlit
20
+
21
+ # Set cache env vars
22
  ENV TRANSFORMERS_CACHE=/app/cache
23
  ENV HF_HOME=/app/cache
24
  ENV SENTENCE_TRANSFORMERS_HOME=/app/cache
25
 
 
 
 
26
  EXPOSE 8501
27
 
28
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health