# THE FACTORY - Image Generation for RunPod Serverless FROM runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 WORKDIR /app # Copy requirements and install Python packages COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all Python files COPY *.py ./ # Set environment variables ENV PYTHONUNBUFFERED=1 ENV HF_HOME=/runpod-volume/huggingface ENV TRANSFORMERS_CACHE=/runpod-volume/huggingface # Run the handler CMD ["python", "-u", "/app/handler.py"]