84a59d7b4f
Aktuelles transformers schaltet PyTorch ab wenn < 2.4
("Disabling PyTorch because PyTorch >= 2.4 is required, found 2.3.1").
Ohne PyTorch laed diffusers das FLUX-Modell nicht. torchvision wird
zusaetzlich von CLIPImageProcessor/SiglipImageProcessor gebraucht.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
919 B
Docker
28 lines
919 B
Docker
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# PyTorch CUDA-Wheels zuerst, damit diffusers nicht CPU-Torch zieht.
|
|
# Torch 2.4+ ist Pflicht: aktuelle transformers (>=4.43, von diffusers
|
|
# transitiv reingezogen) lehnt aeltere Versionen ab ("Disabling PyTorch
|
|
# because PyTorch >= 2.4 is required"). torchvision wird von den
|
|
# CLIP-/Siglip-ImageProcessors verlangt, sonst Fallback auf PIL +
|
|
# Warnings. cu121 bleibt — passt zum CUDA 12.2 Base-Image.
|
|
RUN pip3 install --no-cache-dir \
|
|
torch==2.4.1 torchvision==0.19.1 \
|
|
--index-url https://download.pytorch.org/whl/cu121
|
|
|
|
COPY requirements.txt .
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
COPY bridge.py .
|
|
|
|
CMD ["python3", "bridge.py"]
|