# Use official Python image #FROM python:3.9 # Use official Python image (3.10 is required for Gemini) FROM python:3.10-slim # Set working directory WORKDIR /app # Copy project files COPY . . # Set environment variables for Hugging Face cache ENV TRANSFORMERS_CACHE=/tmp/huggingface_cache RUN mkdir -p $TRANSFORMERS_CACHE && chmod -R 777 $TRANSFORMERS_CACHE # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose port EXPOSE 7860 # Run the application CMD ["python", "app.py"]