FROM python:3.9-slim WORKDIR /app # Copy requirements first COPY requirements.txt . # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application COPY app.py . # Create directories RUN mkdir -p generated_images # Expose port EXPOSE 8000 # Run the application CMD ["python", "app.py"]