# Use a Python base image FROM python:3.10-slim # Set working directory WORKDIR /app # Copy requirements and install them COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy your Streamlit app COPY app.py . # Expose the correct port for Hugging Face EXPOSE 7860 # Use CMD with python -m to ensure it works even if streamlit is not globally linked CMD ["python", "-m", "streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]