ahanbose commited on
Commit
2b42f8b
·
verified ·
1 Parent(s): 94fa54f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -7
Dockerfile CHANGED
@@ -26,23 +26,21 @@ COPY --chown=user requirements.txt .
26
  RUN pip install --no-cache-dir --upgrade pip && \
27
  pip install --no-cache-dir -r requirements.txt
28
 
29
- # 5. Copy Streamlit config (faster startup — disables file watcher)
30
- COPY --chown=user .streamlit/ /home/user/.streamlit/
31
-
32
- # 6. Copy app files from src/
33
  COPY --chown=user src/ .
34
 
35
- # 7. Create persistent data directories
36
  RUN mkdir -p data/faiss_index data/uploads
37
 
38
- # 8. Expose the CORRECT Hugging Face port
39
  EXPOSE 7860
40
 
41
- # 9. Entrypoint config flags already set in .streamlit/config.toml
42
  ENTRYPOINT ["streamlit", "run", "app.py", \
43
  "--server.port=7860", \
44
  "--server.address=0.0.0.0", \
45
  "--server.enableXsrfProtection=false", \
46
  "--server.enableCORS=false", \
47
  "--server.headless=true", \
 
48
  "--browser.gatherUsageStats=false"]
 
26
  RUN pip install --no-cache-dir --upgrade pip && \
27
  pip install --no-cache-dir -r requirements.txt
28
 
29
+ # 5. Copy app files from src/
 
 
 
30
  COPY --chown=user src/ .
31
 
32
+ # 6. Create persistent data directories
33
  RUN mkdir -p data/faiss_index data/uploads
34
 
35
+ # 7. Expose the CORRECT Hugging Face port
36
  EXPOSE 7860
37
 
38
+ # 8. Entrypoint with Port 7860 and XSRF fixes
39
  ENTRYPOINT ["streamlit", "run", "app.py", \
40
  "--server.port=7860", \
41
  "--server.address=0.0.0.0", \
42
  "--server.enableXsrfProtection=false", \
43
  "--server.enableCORS=false", \
44
  "--server.headless=true", \
45
+ "--server.fileWatcherType=none", \
46
  "--browser.gatherUsageStats=false"]