File size: 811 Bytes
58f448b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use a lightweight Python 3.9 image as the base
FROM python:3.9.20-slim-bullseye

# Set the working directory within the container where your application code resides
WORKDIR /app

# Copy the requirements.txt file that specifies application's dependencies
COPY requirements.txt ./

# Install the dependencies listed in requirements.txt using pip3
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt

# Copy all files from the current directory (.) on the host machine
# to the /app directory within the container
COPY . .

# Expose port 8501 to make Streamlit application accessible from outside the container
EXPOSE 8501

# Define the command to execute when the container starts. This will run Streamlit 
# and execute your application code located in app.py
CMD ["streamlit", "run", "app.py"]