-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (15 loc) · 924 Bytes
/
Dockerfile
File metadata and controls
22 lines (15 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.13.3-slim
# This copies everything in your current directory to the /app directory in the container.
COPY . /app
# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
WORKDIR /app
# This runs pip install for all the packages listed in your requirements.txt file.
RUN pip3 install -r requirements.txt
# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
EXPOSE 8501
# This command creates a .streamlit directory in the home directory of the container.
RUN mkdir ~/.streamlit
# This copies your Streamlit configuration file into the .streamlit directory you just created.
RUN cp .streamlit/config.toml ~/.streamlit/config.toml
# This sets the default command for the container to run the app with Streamlit.
ENTRYPOINT ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]