# Use an official lightweight Python image FROM python:3.10-slim # Set up working directory WORKDIR /code # Copy requirements file first to utilize Docker layer caching COPY ./requirements.txt /code/requirements.txt # Install dependencies RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Copy the rest of the application files into the container COPY . . # Set environment variables for Streamlit on Hugging Face ENV STREAMLIT_SERVER_PORT=7860 ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 # Expose port 7860 for HF Space routing EXPOSE 7860 # Command to execute your modified app.py CMD ["streamlit", "run", "app.py"]