File size: 492 Bytes
f17b126 fd47b01 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Use a Python base image
FROM python:3.9-slim
# Set the working directory
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application script
COPY app.py .
# Expose the port Streamlit runs on
EXPOSE 8501
# CRITICAL FIX: Use CMD to combine the execution command and filename
# This ensures 'streamlit run app.py' is executed upon container start.
CMD ["streamlit", "run", "app.py"]
|