Nechba commited on
Commit
6e0c983
·
verified ·
1 Parent(s): dfd7c77

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -8
Dockerfile CHANGED
@@ -1,16 +1,23 @@
1
- # Start with a builder image
2
- FROM python:3.9 as builder
3
 
 
4
  WORKDIR /code
 
 
 
 
5
  # Copy only requirements.txt initially to leverage Docker cache
6
- COPY ./requirements.txt /code/requirements.txt
7
 
 
8
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
- COPY . .
 
11
 
12
- RUN apt-get update && apt-get install -y glpk-utils
13
- # Expose port 80 to the outside world
14
 
15
- # Command to run the Uvicorn server
16
- CMD ["streamlit", "run", "app.py"]
 
1
+ # Use an appropriate base image
2
+ FROM python:3.9
3
 
4
+ # Set the working directory
5
  WORKDIR /code
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y glpk-utils
9
+
10
  # Copy only requirements.txt initially to leverage Docker cache
11
+ COPY requirements.txt /code/requirements.txt
12
 
13
+ # Install Python dependencies
14
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
 
16
+ # Copy the rest of the application code
17
+ COPY . /code
18
 
19
+ # Expose the port Streamlit runs on (default is 8501)
20
+ EXPOSE 8501
21
 
22
+ # Command to run your Streamlit application
23
+ CMD ["streamlit", "run", "app.py", "--server.port", "8501", "--server.address", "0.0.0.0"]