1d3c45fdda
transformers 4.50+ registriert in integrations/moe.py einen torch.library
.custom_op mit String-Forward-References als Type-Annotations. Torch 2.4's
infer_schema kann diese nicht aufloesen ("Parameter input has unsupported
type torch.Tensor"), erst 2.5+ macht typing.get_type_hints() draus.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
1.1 KiB
Docker
31 lines
1.1 KiB
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.5+ ist Pflicht: aktuelle transformers (4.50+, von diffusers
|
|
# transitiv reingezogen) registriert in integrations/moe.py einen
|
|
# custom_op mit String-Forward-References (`input: 'torch.Tensor'`).
|
|
# Erst torch 2.5's infer_schema kann die aufloesen — 2.4.1 crasht mit
|
|
# "Parameter input has unsupported type torch.Tensor" beim Import von
|
|
# diffusers.pipelines.flux.pipeline_flux.
|
|
# torchvision wird von den CLIP-/Siglip-ImageProcessors verlangt.
|
|
# cu121 bleibt — passt zum CUDA 12.2 Base-Image.
|
|
RUN pip3 install --no-cache-dir \
|
|
torch==2.5.1 torchvision==0.20.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"]
|