FROM python:3.8-slim WORKDIR /app # Set the working directory in the container COPY requirements.txt ./ # Copy the requirements file RUN pip install --no-cache-dir -r requirements.txt # Install dependencies # Clear Hugging Face cache RUN rm -rf /root/.cache/huggingface COPY app.py ./ # Copy your Flask app CMD ["python", "app.py"] # Command to run your Flask app