MBG0903 commited on
Commit
507de35
·
verified ·
1 Parent(s): 7e81d8c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -10
Dockerfile CHANGED
@@ -3,21 +3,20 @@ FROM python:3.9
3
  # Set working directory
4
  WORKDIR /app
5
 
 
 
 
 
6
  # Make a writable home so Streamlit can store machine_id etc.
7
  ENV HOME=/tmp
8
  RUN mkdir -p /tmp/.streamlit && chmod -R 777 /tmp/.streamlit
9
 
10
- # Copy requirements first (for caching)
11
- COPY app/requirements.txt /app/requirements.txt
12
-
13
- # Install dependencies
14
- RUN pip install --no-cache-dir -r requirements.txt
15
-
16
- # Copy app files
17
- COPY app /app
18
 
19
  # Expose Streamlit port
20
  EXPOSE 8501
21
 
22
- # Run Streamlit
23
- CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
+ # Copy requirements.txt from root
7
+ COPY requirements.txt /app/requirements.txt
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
  # Make a writable home so Streamlit can store machine_id etc.
11
  ENV HOME=/tmp
12
  RUN mkdir -p /tmp/.streamlit && chmod -R 777 /tmp/.streamlit
13
 
14
+ # Copy everything inside src folder
15
+ COPY src /app
 
 
 
 
 
 
16
 
17
  # Expose Streamlit port
18
  EXPOSE 8501
19
 
20
+ # Run Streamlit (note: app file is app.py inside /app now)
21
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
22
+