@@ -69,6 +69,15 @@ RUN git clone --filter=tree:0 --no-single-branch --no-checkout \
69
69
git submodule update --init --recursive --jobs 8 \
70
70
--depth 1 --filter=tree:0
71
71
72
+ FROM alpine/git:2.36.3 AS triton-downloader
73
+ WORKDIR /git
74
+ ARG TRITON_COMMIT='v3.4.0'
75
+ RUN git clone --filter=tree:0 --no-single-branch --no-checkout \
76
+ https://github.com/openai/triton.git && \
77
+ cd triton && \
78
+ git checkout "${TRITON_COMMIT}" && \
79
+ git submodule update --init --recursive --jobs 8 \
80
+ --depth 1 --filter=tree:0
72
81
73
82
FROM alpine/git:2.36.3 AS lmcache-downloader
74
83
WORKDIR /git
@@ -122,6 +131,21 @@ RUN --mount=type=bind,from=flashinfer-downloader,source=/git/flashinfer,target=/
122
131
123
132
WORKDIR /wheels
124
133
134
+ FROM builder-base AS triton-builder
135
+ RUN --mount=type=bind,from=triton-downloader,source=/git/triton,target=/workspace,rw \
136
+ . /opt/arch_flags.sh && \
137
+ pip install --no-cache-dir -r python/requirements.txt && \
138
+ python3 -m pip wheel -w /wheels \
139
+ -v --no-cache-dir --no-build-isolation --no-deps \
140
+ -c /opt/constraints.txt \
141
+ ./ && \
142
+ python3 -m pip wheel -w /wheels \
143
+ -v --no-cache-dir --no-build-isolation --no-deps \
144
+ -c /opt/constraints.txt \
145
+ python/triton_kernels
146
+
147
+ WORKDIR /wheels
148
+
125
149
126
150
FROM builder-base AS lmcache-builder
127
151
# LMCache must be built from source as it doesn't have pre-built ARM binaries
@@ -170,13 +194,18 @@ RUN --mount=type=bind,from=vllm-builder,source=/wheels,target=/tmp/wheels \
170
194
RUN --mount=type=bind,from=flashinfer-builder,source=/wheels,target=/tmp/wheels \
171
195
python3 -m pip install --no-cache-dir /tmp/wheels/*.whl -c /tmp/constraints.txt
172
196
197
+ RUN --mount=type=bind,from=triton-builder,source=/wheels,target=/tmp/wheels \
198
+ python3 -m pip install --no-cache-dir /tmp/wheels/*.whl -c /tmp/constraints.txt
199
+
173
200
# InfiniStore must be installed before LMCache as LMCache depends on InfiniStore
174
201
RUN --mount=type=bind,from=infinistore-builder,source=/wheels,target=/tmp/wheels \
175
202
python3 -m pip install --no-cache-dir /tmp/wheels/*.whl -c /tmp/constraints.txt
176
203
177
204
RUN --mount=type=bind,from=lmcache-builder,source=/wheels,target=/tmp/wheels \
178
205
python3 -m pip install --no-cache-dir /tmp/wheels/*.whl -c /tmp/constraints.txt
179
206
207
+ RUN python3 -m pip install --no-cache-dir "transformers==4.54.1" -c /tmp/constraints.txt
208
+
180
209
# Copied from vLLM's Dockerfile
181
210
ARG TARGETPLATFORM
182
211
0 commit comments