FROM python:3.11-slim WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Create cache directory with correct permissions RUN mkdir -p /tmp && chmod 777 /tmp # Expose port for Hugging Face Spaces EXPOSE 7860 # Start the application CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]