# Dockerfile - Good News App (HF Space) FROM python:3.10-slim # Create app dir WORKDIR /app # Copy requirements and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY app.py . # Make writable cache directory for Hugging Face / transformers RUN mkdir -p /tmp/hf_cache && chmod -R 777 /tmp/hf_cache # Set env vars so transformers/HF use writable cache ENV TRANSFORMERS_CACHE=/tmp/hf_cache ENV HF_HOME=/tmp/hf_cache # Expose port used by Gradio EXPOSE 7860 # Run the Gradio app CMD ["python", "app.py"]