# Use an official lightweight Python image FROM python:3.9-slim # Set working directory in the container WORKDIR /app # Copy application files COPY requirements.txt /app/requirements.txt # Install dependencies RUN pip install -r requirements.txt # Copy application files COPY app.py /app/app.py # Copy application files COPY trained_model.pkl /app/trained_model.pkl # Set appropriate permissions for the model file RUN chmod 644 /app/trained_model.pkl # Expose the default Streamlit port EXPOSE 7860 # Command to run the Streamlit app CMD ["streamlit", "run", "--server.port", "7860", "app.py"]