@@ -85,9 +85,6 @@ elif [[ "$image" == *linter* ]]; then
8585 DOCKERFILE=" linter/Dockerfile"
8686fi
8787
88- # CMake 3.18 is needed to support CUDA17 language variant
89- CMAKE_VERSION=3.18.5
90-
9188_UCX_COMMIT=7bb2722ff2187a0cad557ae4a6afa090569f83fb
9289_UCC_COMMIT=20eae37090a4ce1b32bcce6144ccad0b49943e0b
9390if [[ " $image " == * rocm* ]]; then
@@ -110,7 +107,6 @@ case "$tag" in
110107 KATEX=yes
111108 UCX_COMMIT=${_UCX_COMMIT}
112109 UCC_COMMIT=${_UCC_COMMIT}
113- CONDA_CMAKE=yes
114110 TRITON=yes
115111 ;;
116112 pytorch-linux-focal-cuda12.4-cudnn9-py3-gcc9-inductor-benchmarks)
@@ -122,7 +118,6 @@ case "$tag" in
122118 KATEX=yes
123119 UCX_COMMIT=${_UCX_COMMIT}
124120 UCC_COMMIT=${_UCC_COMMIT}
125- CONDA_CMAKE=yes
126121 TRITON=yes
127122 INDUCTOR_BENCHMARKS=yes
128123 ;;
@@ -135,7 +130,6 @@ case "$tag" in
135130 KATEX=yes
136131 UCX_COMMIT=${_UCX_COMMIT}
137132 UCC_COMMIT=${_UCC_COMMIT}
138- CONDA_CMAKE=yes
139133 TRITON=yes
140134 INDUCTOR_BENCHMARKS=yes
141135 ;;
@@ -148,7 +142,6 @@ case "$tag" in
148142 KATEX=yes
149143 UCX_COMMIT=${_UCX_COMMIT}
150144 UCC_COMMIT=${_UCC_COMMIT}
151- CONDA_CMAKE=yes
152145 TRITON=yes
153146 INDUCTOR_BENCHMARKS=yes
154147 ;;
@@ -161,7 +154,6 @@ case "$tag" in
161154 KATEX=yes
162155 UCX_COMMIT=${_UCX_COMMIT}
163156 UCC_COMMIT=${_UCC_COMMIT}
164- CONDA_CMAKE=yes
165157 TRITON=yes
166158 ;;
167159 pytorch-linux-focal-cuda12.6-cudnn9-py3-gcc9-inductor-benchmarks)
@@ -173,7 +165,6 @@ case "$tag" in
173165 KATEX=yes
174166 UCX_COMMIT=${_UCX_COMMIT}
175167 UCC_COMMIT=${_UCC_COMMIT}
176- CONDA_CMAKE=yes
177168 TRITON=yes
178169 INDUCTOR_BENCHMARKS=yes
179170 ;;
@@ -186,7 +177,6 @@ case "$tag" in
186177 KATEX=yes
187178 UCX_COMMIT=${_UCX_COMMIT}
188179 UCC_COMMIT=${_UCC_COMMIT}
189- CONDA_CMAKE=yes
190180 TRITON=yes
191181 INDUCTOR_BENCHMARKS=yes
192182 ;;
@@ -199,7 +189,6 @@ case "$tag" in
199189 KATEX=yes
200190 UCX_COMMIT=${_UCX_COMMIT}
201191 UCC_COMMIT=${_UCC_COMMIT}
202- CONDA_CMAKE=yes
203192 TRITON=yes
204193 INDUCTOR_BENCHMARKS=yes
205194 ;;
@@ -212,35 +201,30 @@ case "$tag" in
212201 KATEX=yes
213202 UCX_COMMIT=${_UCX_COMMIT}
214203 UCC_COMMIT=${_UCC_COMMIT}
215- CONDA_CMAKE=yes
216204 TRITON=yes
217205 ;;
218206 pytorch-linux-focal-py3-clang10-onnx)
219207 ANACONDA_PYTHON_VERSION=3.9
220208 CLANG_VERSION=10
221209 VISION=yes
222- CONDA_CMAKE=yes
223210 ONNX=yes
224211 ;;
225212 pytorch-linux-focal-py3.9-clang10)
226213 ANACONDA_PYTHON_VERSION=3.9
227214 CLANG_VERSION=10
228215 VISION=yes
229- CONDA_CMAKE=yes
230216 TRITON=yes
231217 ;;
232218 pytorch-linux-focal-py3.11-clang10)
233219 ANACONDA_PYTHON_VERSION=3.11
234220 CLANG_VERSION=10
235221 VISION=yes
236- CONDA_CMAKE=yes
237222 TRITON=yes
238223 ;;
239224 pytorch-linux-focal-py3.9-gcc9)
240225 ANACONDA_PYTHON_VERSION=3.9
241226 GCC_VERSION=9
242227 VISION=yes
243- CONDA_CMAKE=yes
244228 TRITON=yes
245229 ;;
246230 pytorch-linux-jammy-rocm-n-1-py3)
@@ -249,7 +233,6 @@ case "$tag" in
249233 VISION=yes
250234 ROCM_VERSION=6.3
251235 NINJA_VERSION=1.9.0
252- CONDA_CMAKE=yes
253236 TRITON=yes
254237 KATEX=yes
255238 UCX_COMMIT=${_UCX_COMMIT}
@@ -262,7 +245,6 @@ case "$tag" in
262245 VISION=yes
263246 ROCM_VERSION=6.4
264247 NINJA_VERSION=1.9.0
265- CONDA_CMAKE=yes
266248 TRITON=yes
267249 KATEX=yes
268250 UCX_COMMIT=${_UCX_COMMIT}
@@ -275,7 +257,6 @@ case "$tag" in
275257 VISION=yes
276258 XPU_VERSION=0.5
277259 NINJA_VERSION=1.9.0
278- CONDA_CMAKE=yes
279260 TRITON=yes
280261 ;;
281262 pytorch-linux-jammy-xpu-2025.0-py3)
@@ -284,15 +265,13 @@ case "$tag" in
284265 VISION=yes
285266 XPU_VERSION=2025.0
286267 NINJA_VERSION=1.9.0
287- CONDA_CMAKE=yes
288268 TRITON=yes
289269 ;;
290270 pytorch-linux-jammy-py3.9-gcc11-inductor-benchmarks)
291271 ANACONDA_PYTHON_VERSION=3.9
292272 GCC_VERSION=11
293273 VISION=yes
294274 KATEX=yes
295- CONDA_CMAKE=yes
296275 TRITON=yes
297276 DOCS=yes
298277 INDUCTOR_BENCHMARKS=yes
@@ -309,70 +288,60 @@ case "$tag" in
309288 ANACONDA_PYTHON_VERSION=3.9
310289 CLANG_VERSION=12
311290 VISION=yes
312- CONDA_CMAKE=yes
313291 TRITON=yes
314292 ;;
315293 pytorch-linux-jammy-py3-clang15-asan)
316294 ANACONDA_PYTHON_VERSION=3.10
317295 CLANG_VERSION=15
318- CONDA_CMAKE=yes
319296 VISION=yes
320297 ;;
321298 pytorch-linux-jammy-py3-clang18-asan)
322299 ANACONDA_PYTHON_VERSION=3.10
323300 CLANG_VERSION=18
324- CONDA_CMAKE=yes
325301 VISION=yes
326302 ;;
327303 pytorch-linux-jammy-py3.9-gcc11)
328304 ANACONDA_PYTHON_VERSION=3.9
329305 GCC_VERSION=11
330306 VISION=yes
331307 KATEX=yes
332- CONDA_CMAKE=yes
333308 TRITON=yes
334309 DOCS=yes
335310 UNINSTALL_DILL=yes
336311 ;;
337312 pytorch-linux-jammy-py3-clang12-executorch)
338313 ANACONDA_PYTHON_VERSION=3.10
339314 CLANG_VERSION=12
340- CONDA_CMAKE=yes
341315 EXECUTORCH=yes
342316 ;;
343317 pytorch-linux-jammy-py3.12-halide)
344318 CUDA_VERSION=12.6
345319 ANACONDA_PYTHON_VERSION=3.12
346320 GCC_VERSION=11
347- CONDA_CMAKE=yes
348321 HALIDE=yes
349322 TRITON=yes
350323 ;;
351324 pytorch-linux-jammy-py3.12-triton-cpu)
352325 CUDA_VERSION=12.6
353326 ANACONDA_PYTHON_VERSION=3.12
354327 GCC_VERSION=11
355- CONDA_CMAKE=yes
356328 TRITON_CPU=yes
357329 ;;
358330 pytorch-linux-focal-linter)
359331 # TODO: Use 3.9 here because of this issue https://github.com/python/mypy/issues/13627.
360332 # We will need to update mypy version eventually, but that's for another day. The task
361333 # would be to upgrade mypy to 1.0.0 with Python 3.11
362334 PYTHON_VERSION=3.9
363- PIP_CMAKE=yes
364335 ;;
365336 pytorch-linux-jammy-cuda11.8-cudnn9-py3.9-linter)
366337 PYTHON_VERSION=3.9
367338 CUDA_VERSION=11.8
368- PIP_CMAKE=yes
369339 ;;
370340 pytorch-linux-jammy-aarch64-py3.10-gcc11)
371341 ANACONDA_PYTHON_VERSION=3.10
372342 GCC_VERSION=11
373343 ACL=yes
374344 VISION=yes
375- CONDA_CMAKE=yes
376345 # snadampal: skipping llvm src build install because the current version
377346 # from pytorch/llvm:9.0.1 is x86 specific
378347 SKIP_LLVM_SRC_BUILD_INSTALL=yes
@@ -382,7 +351,6 @@ case "$tag" in
382351 GCC_VERSION=11
383352 ACL=yes
384353 VISION=yes
385- CONDA_CMAKE=yes
386354 # snadampal: skipping llvm src build install because the current version
387355 # from pytorch/llvm:9.0.1 is x86 specific
388356 SKIP_LLVM_SRC_BUILD_INSTALL=yes
@@ -405,8 +373,7 @@ case "$tag" in
405373 TRITON=yes
406374 # To ensure that any ROCm config will build using conda cmake
407375 # and thus have LAPACK/MKL enabled
408- CONDA_CMAKE=yes
409- fi
376+ fi
410377 if [[ " $image " == * centos7* ]]; then
411378 NINJA_VERSION=1.10.2
412379 fi
@@ -422,9 +389,6 @@ case "$tag" in
422389 if [[ " $image " == * glibc* ]]; then
423390 extract_version_from_image_name glibc GLIBC_VERSION
424391 fi
425- if [[ " $image " == * cmake* ]]; then
426- extract_version_from_image_name cmake CMAKE_VERSION
427- fi
428392 ;;
429393esac
430394
@@ -465,16 +429,13 @@ docker build \
465429 --build-arg " CUDNN_VERSION=${CUDNN_VERSION} " \
466430 --build-arg " TENSORRT_VERSION=${TENSORRT_VERSION} " \
467431 --build-arg " GRADLE_VERSION=${GRADLE_VERSION} " \
468- --build-arg " CMAKE_VERSION=${CMAKE_VERSION:- } " \
469432 --build-arg " NINJA_VERSION=${NINJA_VERSION:- } " \
470433 --build-arg " KATEX=${KATEX:- } " \
471434 --build-arg " ROCM_VERSION=${ROCM_VERSION:- } " \
472435 --build-arg " PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH:- gfx90a;gfx942} " \
473436 --build-arg " IMAGE_NAME=${IMAGE_NAME} " \
474437 --build-arg " UCX_COMMIT=${UCX_COMMIT} " \
475438 --build-arg " UCC_COMMIT=${UCC_COMMIT} " \
476- --build-arg " CONDA_CMAKE=${CONDA_CMAKE} " \
477- --build-arg " PIP_CMAKE=${PIP_CMAKE} " \
478439 --build-arg " TRITON=${TRITON} " \
479440 --build-arg " TRITON_CPU=${TRITON_CPU} " \
480441 --build-arg " ONNX=${ONNX} " \
@@ -560,3 +521,12 @@ elif [ "$HAS_TRITON" = "yes" ]; then
560521 echo " expecting triton to not be installed, but it is"
561522 exit 1
562523fi
524+
525+ # Sanity check cmake version. Executorch reinstalls cmake and I'm not sure if
526+ # they support 4.0.0 yet, so exclude them from this check.
527+ CMAKE_VERSION=$( drun cmake --version)
528+ if [[ " $EXECUTORCH " != * yes* && " $CMAKE_VERSION " != * 4.* ]]; then
529+ echo " CMake version is not 4.0.0:"
530+ drun cmake --version
531+ exit 1
532+ fi
0 commit comments