FROM python:3.10-slim WORKDIR /app # Copy files COPY ./src /app/src COPY requirements.txt . # Create a safe cache directory RUN mkdir -p /app/cache # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Set environment variables for safe caching ENV HF_HOME=/app/cache ENV TRANSFORMERS_CACHE=/app/cache ENV STREAMLIT_SERVER_HEADLESS=true # Run the app CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]