File size: 636 Bytes
e15aa06 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # 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"] |