thewise commited on
Commit
58255bc
·
verified ·
1 Parent(s): 2d91db2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -13,11 +13,16 @@ RUN mkdir /app/github_repo && chown -R user:user /app/github_repo
13
  # Switch to the non-root user
14
  USER user
15
 
 
 
 
16
  # Copy application files as the non-root user to avoid permission issues
17
  COPY --chown=user:user . /app
18
 
19
- # Install dependencies, ensuring the streamlit executable is in PATH
20
- # Ensure the requirements.txt is present and correctly referenced here
21
  RUN pip install --upgrade pip && pip install --user -r requirements.txt
22
 
 
 
 
23
  ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
13
  # Switch to the non-root user
14
  USER user
15
 
16
+ # Update PATH to ensure local bin is included
17
+ ENV PATH=/home/user/.local/bin:$PATH
18
+
19
  # Copy application files as the non-root user to avoid permission issues
20
  COPY --chown=user:user . /app
21
 
22
+ # Install dependencies
 
23
  RUN pip install --upgrade pip && pip install --user -r requirements.txt
24
 
25
+ #EXPOSE 8501
26
+ #I commented out EXPOSE 8501, and gave 7860 in CMD, since it works. Funny? The building of Streamlit never stops with 8501!!!
27
+
28
  ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]