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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -14,8 +14,16 @@ COPY src/ ./src/
14
 
15
  RUN pip3 install -r requirements.txt
16
 
 
 
 
 
 
 
 
 
17
  EXPOSE 8501
18
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
20
 
21
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
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
28
 
29
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]