FROM python:3.9-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Set default port, override with environment variable if needed ENV PORT=8501 EXPOSE 8501 CMD streamlit run app.py --server.port ${PORT}