| # Use a lightweight Python image | |
| FROM python:3.10-slim | |
| # Install system dependencies (if any) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| # Copy application code | |
| COPY app.py /home/app/app.py | |
| # Set working directory | |
| WORKDIR /home/app | |
| # Expose port Streamlit will run on | |
| EXPOSE 7860 | |
| # Start the Streamlit app | |
| CMD ["streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"] |