File size: 875 Bytes
2b49027
 
a7d030a
2b49027
a7d030a
 
2b49027
 
 
a7d030a
2b49027
a7d030a
2b49027
a7d030a
2b49027
 
a7d030a
2b49027
a7d030a
 
2b49027
a7d030a
 
2b49027
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Use the official Python base image
FROM python:3.11-slim

# Set the working directory in the container
WORKDIR /app

# Upgrade pip and install necessary system dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN apt-get update && apt-get install -y --no-install-recommends build-essential git && rm -rf /var/lib/apt/lists/*

# Copy the requirements file first to leverage Docker cache
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# Copy all other project files and folders (app.py, images, Resources, etc.) into the container
COPY . .

# Expose the port Streamlit runs on
EXPOSE 8501

# Health check to see if the app is running
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

# Command to run your Streamlit application
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]