1
- ARG CUDA_VERSION=12.4 .1
1
+ ARG CUDA_VERSION=12.8 .1
2
2
ARG IMAGE_DISTRO=ubuntu22.04
3
3
ARG PYTHON_VERSION=3.12
4
4
@@ -49,95 +49,19 @@ ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
49
49
ENV CUDA_HOME=/usr/local/cuda
50
50
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
51
51
52
- FROM base AS build-base
52
+ FROM base AS torch-base
53
+ RUN uv pip install -U torch torchvision torchaudio triton --index-url https://download.pytorch.org/whl/cu128
54
+
55
+ FROM torch-base AS build-base
53
56
RUN mkdir /wheels
54
57
55
58
# Install build deps that aren't in project requirements files
56
59
# Make sure to upgrade setuptools to avoid triton build bug
57
- # cmake '4.x' isn't parsed right by some tools yet
58
- RUN uv pip install -U build "cmake<4" ninja pybind11 setuptools wheel
59
-
60
- # Handle arm64 torch build
61
- FROM build-base AS build-torch
62
- ARG TARGETARCH
63
- RUN if [ ${TARGETARCH} = arm64 ]; then \
64
- # Install NVPL for ARM64 \
65
- apt install -y --no-install-recommends nvpl0 && \
66
- export BLAS=NVPL && \
67
- # ARM64 linker optimization \
68
- export CMAKE_SHARED_LINKER_FLAGS=-Wl,-z,max-page-size=0x10000 && \
69
- export USE_PRIORITIZED_TEXT_FOR_LD=1; \
70
- else \
71
- uv pip install mkl-static mkl-include; \
72
- fi
73
-
74
- ARG TORCH_REF=v2.6.0
75
- ARG TORCH_BUILD_VERSION=2.6.0+cu124
76
- ENV PYTORCH_BUILD_VERSION=${TORCH_BUILD_VERSION:-${TORCH_REF#v}}
77
- ENV PYTORCH_BUILD_NUMBER=0
78
- RUN git clone https://github.com/pytorch/pytorch.git
79
- RUN cd pytorch && \
80
- git checkout ${TORCH_REF} && \
81
- git submodule sync --recursive && \
82
- git submodule update --init --recursive -j 8
83
- # # Bump XNNPACK submodule ref to fix compilation bug \
84
- # cd third_party/XNNPACK && \
85
- # git checkout fcc06d1
86
- RUN cd pytorch && \
87
- uv pip install -r requirements.txt && \
88
- uv build --wheel --no-build-isolation -o /wheels
89
-
90
- FROM build-base AS build-audio
91
- COPY --from=build-torch /wheels/*.whl wheels/
92
- RUN uv pip install wheels/*
93
-
94
- ARG AUDIO_REF=v2.6.0
95
- ARG AUDIO_BUILD_VERSION=2.6.0+cu124
96
- ENV BUILD_VERSION=${AUDIO_BUILD_VERSION:-${AUDIO_REF#v}}
97
- RUN git clone https://github.com/pytorch/audio.git
98
- RUN cd audio && \
99
- git checkout ${AUDIO_REF} && \
100
- git submodule sync --recursive && \
101
- git submodule update --init --recursive -j 8
102
- RUN cd audio && \
103
- uv build --wheel --no-build-isolation -o /wheels
104
-
105
- FROM build-base AS build-vision
106
- COPY --from=build-torch /wheels/*.whl wheels/
107
- RUN uv pip install wheels/*
108
-
109
- ARG VISION_REF=v0.21.0
110
- ARG VISION_BUILD_VERSION=0.21.0+cu124
111
- ENV BUILD_VERSION=${VISION_BUILD_VERSION:-${VISION_REF#v}}
112
- RUN git clone https://github.com/pytorch/vision.git
113
- RUN cd vision && \
114
- git checkout ${VISION_REF} && \
115
- git submodule sync --recursive && \
116
- git submodule update --init --recursive -j 8
117
- RUN cd vision && \
118
- uv build --wheel --no-build-isolation -o /wheels
119
-
120
- FROM build-base AS build-triton
121
- COPY --from=build-torch /wheels/*.whl wheels/
122
- RUN uv pip install wheels/*
123
-
124
- ARG TRITON_REF=release/3.2.x
125
- ARG TRITON_BUILD_SUFFIX=+cu124
126
- ENV TRITON_WHEEL_VERSION_SUFFIX=${TRITON_BUILD_SUFFIX:-}
127
- RUN git clone https://github.com/triton-lang/triton.git
128
- RUN cd triton && \
129
- git checkout ${TRITON_REF} && \
130
- git submodule sync --recursive && \
131
- git submodule update --init --recursive -j 8
132
- RUN cd triton && \
133
- uv build python --wheel --no-build-isolation -o /wheels
60
+ RUN uv pip install -U build cmake ninja packaging pybind11 setuptools wheel
134
61
135
62
FROM build-base AS build-xformers
136
- COPY --from=build-torch /wheels/*.whl wheels/
137
- RUN uv pip install wheels/*
138
-
139
- ARG XFORMERS_REF=v0.0.29.post2
140
- ARG XFORMERS_BUILD_VERSION=0.0.29.post2+cu124
63
+ ARG XFORMERS_REF=v0.0.30
64
+ ARG XFORMERS_BUILD_VERSION=0.0.30+cu128
141
65
ENV BUILD_VERSION=${XFORMERS_BUILD_VERSION:-${XFORMERS_REF#v}}
142
66
RUN git clone https://github.com/facebookresearch/xformers.git
143
67
RUN cd xformers && \
@@ -148,42 +72,32 @@ RUN cd xformers && \
148
72
uv build --wheel --no-build-isolation -o /wheels
149
73
150
74
FROM build-base AS build-flashinfer
151
- COPY --from=build-torch /wheels/*.whl wheels/
152
- RUN uv pip install wheels/*
153
-
154
- ARG FLASHINFER_ENABLE_AOT=1
155
- ARG FLASHINFER_REF=v0.2.2.post1
156
- ARG FLASHINFER_BUILD_SUFFIX=cu124
75
+ ARG FLASHINFER_REF=v0.2.6.post1
76
+ ARG FLASHINFER_BUILD_SUFFIX=cu128
157
77
ENV FLASHINFER_LOCAL_VERSION=${FLASHINFER_BUILD_SUFFIX:-}
158
78
RUN git clone https://github.com/flashinfer-ai/flashinfer.git
159
79
RUN cd flashinfer && \
160
80
git checkout ${FLASHINFER_REF} && \
161
81
git submodule sync --recursive && \
162
82
git submodule update --init --recursive -j 8
163
83
RUN cd flashinfer && \
164
- uv build --wheel --no-build-isolation -o /wheels
84
+ python -m flashinfer.aot && \
85
+ python -m build -v --wheel --no-isolation -o /wheels
165
86
166
87
FROM build-base AS build-vllm
167
- COPY --from=build-torch /wheels/*.whl wheels/
168
- RUN uv pip install wheels/*
169
-
170
- ARG VLLM_REF=v0.8.5
171
- ARG VLLM_BUILD_VERSION=0.8.5
88
+ ARG VLLM_REF=v0.9.0.1
89
+ ARG VLLM_BUILD_VERSION=0.9.0.1
172
90
ENV BUILD_VERSION=${VLLM_BUILD_VERSION:-${VLLM_REF#v}}
173
91
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${BUILD_VERSION:-:}
174
92
RUN git clone https://github.com/vllm-project/vllm.git
175
93
RUN cd vllm && \
176
94
git checkout ${VLLM_REF} && \
177
95
python use_existing_torch.py && \
178
96
uv pip install -r requirements/build.txt && \
179
- uv build --wheel --no-build-isolation -o /wheels
97
+ uv build -v - -wheel --no-build-isolation -o /wheels
180
98
181
- FROM base AS vllm-openai
182
- COPY --from=build-torch /wheels/*.whl wheels/
183
- COPY --from=build-audio /wheels/*.whl wheels/
184
- COPY --from=build-vision /wheels/*.whl wheels/
99
+ FROM torch-base AS vllm-openai
185
100
COPY --from=build-flashinfer /wheels/*.whl wheels/
186
- COPY --from=build-triton /wheels/*.whl wheels/
187
101
COPY --from=build-vllm /wheels/*.whl wheels/
188
102
COPY --from=build-xformers /wheels/*.whl wheels/
189
103
0 commit comments