Tasks: - image_generate: Generate image from prompt - image_variant: Generate variant of existing image - image_upscale: Increase resolution Models: SDXL, Flux, SDXL-Turbo RunPod Serverless Handler
20 lines
493 B
Docker
20 lines
493 B
Docker
# 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"]
|