This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 72f51851f1 [CI] Refactor Dockerfiles and installation scripts (#18796)
72f51851f1 is described below
commit 72f51851f1db4bba510a1e60ff3c6b16627cc13d
Author: Masahiro Hiramori <[email protected]>
AuthorDate: Fri Feb 20 00:22:29 2026 +0900
[CI] Refactor Dockerfiles and installation scripts (#18796)
- **Removed Rust toolchain** from all CI Docker images (no longer
needed)
- **Deleted 8 obsolete scripts**: Ubuntu 20.04-specific installers, old
LLVM/CMake/Golang/sbt scripts
- **New `download-and-verify` utility**: reusable curl + checksum
verification helper, used across install scripts
- **CMake & sccache**: switched from source/cargo builds to prebuilt
binaries with checksum verification
- **LLVM**: consolidated to one script, updated from Focal/LLVM 10-12 to
Jammy/LLVM 15-17
- **APT key management**: migrated from deprecated `apt-key add` to
`signed-by` keyrings (LLVM, Vulkan, ROCm, Node.js)
- **Version upgrades**: Emscripten 4.0.23, Node.js 22.x, TensorFlow
2.19.0, NumPy 1.26.*, Apache RAT 0.17, Wasmtime v41.0.3
- **Dockerfile maintainance**: `ENV KEY=value` syntax, `trap cleanup
EXIT` patterns, `cmake --build` instead of `make`, Python support
narrowed to 3.10-3.11
The image builds are significantly faster now.
- ci_arm: 37m -> 13m
- ci_cpu: 44m -> 15m
- ci_gpu: 53m -> 28m
---
docker/Dockerfile.ci_arm | 24 ++++-----
docker/Dockerfile.ci_cpu | 33 +++++-------
docker/Dockerfile.ci_gpu | 40 ++++++--------
docker/Dockerfile.ci_lint | 19 +++----
docker/Dockerfile.ci_wasm | 29 ++++------
docker/install/ubuntu2004_install_core.sh | 43 ---------------
docker/install/ubuntu2004_install_python.sh | 44 ---------------
.../install/ubuntu2004_install_python_package.sh | 44 ---------------
docker/install/ubuntu2004_install_redis.sh | 26 ---------
docker/install/ubuntu2204_install_llvm.sh | 48 -----------------
docker/install/ubuntu_install_aprofile_aem.sh | 8 +--
docker/install/ubuntu_install_clang_format.sh | 12 +++--
docker/install/ubuntu_install_cmake.sh | 63 ++++++++++++++++++++++
docker/install/ubuntu_install_cmake_source.sh | 40 --------------
docker/install/ubuntu_install_dnnl.sh | 16 +++---
docker/install/ubuntu_install_emscripten.sh | 4 +-
docker/install/ubuntu_install_golang.sh | 25 ---------
docker/install/ubuntu_install_googletest.sh | 3 +-
docker/install/ubuntu_install_libtorch.sh | 19 +++++--
docker/install/ubuntu_install_llvm.sh | 47 +++++++---------
docker/install/ubuntu_install_nodejs.sh | 13 ++---
docker/install/ubuntu_install_python.sh | 19 ++-----
docker/install/ubuntu_install_python_package.sh | 2 +-
docker/install/ubuntu_install_rat.sh | 21 ++++++--
docker/install/ubuntu_install_rocm.sh | 6 ++-
docker/install/ubuntu_install_sbt.sh | 34 ------------
docker/install/ubuntu_install_sccache.sh | 53 ++++++++++++++----
docker/install/ubuntu_install_tensorflow.sh | 8 +--
.../install/ubuntu_install_tensorflow_aarch64.sh | 8 ++-
docker/install/ubuntu_install_tflite.sh | 5 +-
docker/install/ubuntu_install_vulkan.sh | 9 +++-
docker/install/ubuntu_install_wasmtime.sh | 40 +++++++++++---
.../download-and-verify.sh} | 45 ++++++++++------
web/package-lock.json | 7 ---
34 files changed, 320 insertions(+), 537 deletions(-)
diff --git a/docker/Dockerfile.ci_arm b/docker/Dockerfile.ci_arm
index e52501dad8..a27e77da51 100644
--- a/docker/Dockerfile.ci_arm
+++ b/docker/Dockerfile.ci_arm
@@ -21,6 +21,7 @@
FROM ubuntu:22.04
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
+COPY utils/download-and-verify.sh /usr/local/bin/download-and-verify
RUN apt-get update --fix-missing
@@ -32,33 +33,26 @@ RUN bash /install/ubuntu_setup_tz.sh
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
-COPY install/ubuntu_install_cmake_source.sh
/install/ubuntu_install_cmake_source.sh
-RUN bash /install/ubuntu_install_cmake_source.sh
+COPY install/ubuntu_install_cmake.sh /install/ubuntu_install_cmake.sh
+RUN bash /install/ubuntu_install_cmake.sh
COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
RUN bash /install/ubuntu_install_googletest.sh
-# Rust env
-COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
-RUN bash /install/ubuntu_install_rust.sh
-ENV RUSTUP_HOME /opt/rust
-ENV CARGO_HOME /opt/rust
-ENV PATH $PATH:$CARGO_HOME/bin
-
# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh
-ENV PATH /opt/sccache:$PATH
+ENV PATH=/opt/sccache:$PATH
-COPY install/ubuntu2204_install_llvm.sh /install/ubuntu2204_install_llvm.sh
-RUN bash /install/ubuntu2204_install_llvm.sh
+COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh
+RUN bash /install/ubuntu_install_llvm.sh
-ENV TVM_VENV /venv/apache-tvm-py3.10
+ENV TVM_VENV=/venv/apache-tvm-py3.10
COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh 3.10
-ENV PATH ${TVM_VENV}/bin:$PATH
-ENV PYTHONNOUSERSITE 1 # Disable .local directory from affecting CI.
+ENV PATH=${TVM_VENV}/bin:$PATH
+ENV PYTHONNOUSERSITE=1
COPY install/ubuntu_install_python_package.sh
/install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu
index 920ad1a882..b02f11e51f 100644
--- a/docker/Dockerfile.ci_cpu
+++ b/docker/Dockerfile.ci_cpu
@@ -19,6 +19,7 @@
FROM ubuntu:22.04
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
+COPY utils/download-and-verify.sh /usr/local/bin/download-and-verify
RUN apt-get update --fix-missing
@@ -28,24 +29,26 @@ RUN bash /install/ubuntu_setup_tz.sh
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
-COPY install/ubuntu_install_cmake_source.sh
/install/ubuntu_install_cmake_source.sh
-RUN bash /install/ubuntu_install_cmake_source.sh
+COPY install/ubuntu_install_cmake.sh /install/ubuntu_install_cmake.sh
+RUN bash /install/ubuntu_install_cmake.sh
COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
RUN bash /install/ubuntu_install_googletest.sh
-ENV TVM_VENV /venv/apache-tvm-py3.10
+ENV TVM_VENV=/venv/apache-tvm-py3.10
COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh 3.10
-ENV PATH ${TVM_VENV}/bin:$PATH
-ENV PYTHONNOUSERSITE 1 # Disable .local directory from affecting CI.
+ENV PATH=${TVM_VENV}/bin:$PATH
+
+# Disable .local directory from affecting CI.
+ENV PYTHONNOUSERSITE=1
COPY install/ubuntu_install_python_package.sh
/install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
-COPY install/ubuntu2204_install_llvm.sh /install/ubuntu2204_install_llvm.sh
-RUN bash /install/ubuntu2204_install_llvm.sh
+COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh
+RUN bash /install/ubuntu_install_llvm.sh
COPY install/ubuntu_install_dnnl.sh /install/ubuntu_install_dnnl.sh
RUN bash /install/ubuntu_install_dnnl.sh
@@ -53,13 +56,6 @@ RUN bash /install/ubuntu_install_dnnl.sh
COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
RUN bash /install/ubuntu_install_papi.sh ""
-# Rust env (build early; takes a while)
-COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
-RUN bash /install/ubuntu_install_rust.sh
-ENV RUSTUP_HOME /opt/rust
-ENV CARGO_HOME /opt/rust
-ENV PATH $PATH:$CARGO_HOME/bin
-
# wasmtime
COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
RUN bash /install/ubuntu_install_wasmtime.sh
@@ -68,11 +64,6 @@ RUN bash /install/ubuntu_install_wasmtime.sh
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
RUN bash /install/ubuntu_install_redis.sh
-# Golang environment
-COPY install/ubuntu_install_golang.sh /install/ubuntu_install_golang.sh
-RUN bash /install/ubuntu_install_golang.sh
-ENV PATH $PATH:/usr/lib/go-1.18/bin
-
# BYODT deps
COPY install/ubuntu_install_universal.sh /install/ubuntu_install_universal.sh
RUN bash /install/ubuntu_install_universal.sh
@@ -96,7 +87,7 @@ RUN bash /install/ubuntu_download_arm_compute_lib_binaries.sh
# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh
-ENV PATH /opt/sccache:$PATH
+ENV PATH=/opt/sccache:$PATH
# Libxsmm deps
COPY install/ubuntu_install_libxsmm.sh /install
@@ -113,4 +104,4 @@ RUN bash /install/ubuntu_install_nnef.sh
# AArch64 Architecture Envelope Model (AEM)
COPY install/ubuntu_install_aprofile_aem.sh /install
RUN bash /install/ubuntu_install_aprofile_aem.sh
-ENV PATH
$PATH:/opt/arm/fvp/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3/:/opt/arm/gcc-aarch64-none-elf/bin
+ENV
PATH=$PATH:/opt/arm/fvp/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3/:/opt/arm/gcc-aarch64-none-elf/bin
diff --git a/docker/Dockerfile.ci_gpu b/docker/Dockerfile.ci_gpu
index 18b4d3828e..6acf7b5637 100644
--- a/docker/Dockerfile.ci_gpu
+++ b/docker/Dockerfile.ci_gpu
@@ -20,10 +20,11 @@
FROM nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
+COPY utils/download-and-verify.sh /usr/local/bin/download-and-verify
# Per
https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212772
# we need to add a new GPG key before running apt update.
-RUN apt-key adv --fetch-keys
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
+RUN apt-key adv --fetch-keys
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
# Base scripts
RUN rm -f /etc/apt/sources.list.d/nvidia-ml.list && apt-get clean
@@ -35,24 +36,26 @@ RUN bash /install/ubuntu_setup_tz.sh
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
-COPY install/ubuntu_install_cmake_source.sh
/install/ubuntu_install_cmake_source.sh
-RUN bash /install/ubuntu_install_cmake_source.sh
+COPY install/ubuntu_install_cmake.sh /install/ubuntu_install_cmake.sh
+RUN bash /install/ubuntu_install_cmake.sh
COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
RUN bash /install/ubuntu_install_googletest.sh /googletest
-ENV TVM_VENV /venv/apache-tvm-py3.10
+ENV TVM_VENV=/venv/apache-tvm-py3.10
COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh 3.10
-ENV PATH ${TVM_VENV}/bin:$PATH
-ENV PYTHONNOUSERSITE 1 # Disable .local directory from affecting CI.
+ENV PATH=${TVM_VENV}/bin:$PATH
+
+# Disable .local directory from affecting CI.
+ENV PYTHONNOUSERSITE=1
# Globally disable pip cache
RUN pip config set global.no-cache-dir false
-COPY install/ubuntu2204_install_llvm.sh /install/ubuntu2204_install_llvm.sh
-RUN bash /install/ubuntu2204_install_llvm.sh
+COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh
+RUN bash /install/ubuntu_install_llvm.sh
COPY install/ubuntu_install_opencl.sh /install/ubuntu_install_opencl.sh
RUN bash /install/ubuntu_install_opencl.sh
@@ -79,9 +82,6 @@ COPY install/ubuntu_install_rocm.sh
/install/ubuntu_install_rocm.sh
RUN bash /install/ubuntu_install_rocm.sh
# DL Frameworks
-COPY install/ubuntu_install_gluoncv.sh /install/ubuntu_install_gluoncv.sh
-RUN bash /install/ubuntu_install_gluoncv.sh
-
COPY install/ubuntu_install_coreml.sh /install/ubuntu_install_coreml.sh
RUN bash /install/ubuntu_install_coreml.sh
@@ -94,9 +94,6 @@ RUN bash /install/ubuntu_install_jax.sh "cuda"
COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
RUN bash /install/ubuntu_install_onnx.sh "cuda"
-COPY install/ubuntu_install_libtorch.sh /install/ubuntu_install_libtorch.sh
-RUN bash /install/ubuntu_install_libtorch.sh
-
COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh
RUN bash /install/ubuntu_install_tflite.sh
@@ -106,17 +103,10 @@ RUN bash /install/ubuntu_install_dgl.sh
COPY install/ubuntu_install_nnef.sh /install/ubuntu_install_nnef.sh
RUN bash /install/ubuntu_install_nnef.sh
-ENV NVIDIA_DRIVER_CAPABILITIES compute,graphics,utility
+ENV NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility
COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh
RUN bash /install/ubuntu_install_vulkan.sh
-# Rust env (build early; takes a while)
-COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
-RUN bash /install/ubuntu_install_rust.sh
-ENV RUSTUP_HOME /opt/rust
-ENV CARGO_HOME /opt/rust
-ENV PATH $PATH:$CARGO_HOME/bin
-
# wasmtime
COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
RUN bash /install/ubuntu_install_wasmtime.sh
@@ -136,7 +126,7 @@ RUN bash /install/ubuntu_install_papi.sh "cuda rocm"
# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh
-ENV PATH /opt/sccache:$PATH
+ENV PATH=/opt/sccache:$PATH
# dnnl
COPY install/ubuntu_install_dnnl.sh /install/ubuntu_install_dnnl.sh
@@ -145,8 +135,8 @@ RUN bash /install/ubuntu_install_dnnl.sh
# Environment variables
ENV PATH=/usr/local/nvidia/bin:${PATH}
ENV PATH=/usr/local/cuda/bin:${PATH}
-ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH}
-ENV C_INCLUDE_PATH=/usr/local/cuda/include:${C_INCLUDE_PATH}
+ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include
+ENV C_INCLUDE_PATH=/usr/local/cuda/include
ENV LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/compat:${LIBRARY_PATH}
ENV
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/compat:${LD_LIBRARY_PATH}
diff --git a/docker/Dockerfile.ci_lint b/docker/Dockerfile.ci_lint
index 886fc33bf3..ed32cf97af 100644
--- a/docker/Dockerfile.ci_lint
+++ b/docker/Dockerfile.ci_lint
@@ -21,32 +21,27 @@
FROM ubuntu:22.04
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
+COPY utils/download-and-verify.sh /usr/local/bin/download-and-verify
RUN apt-get update --fix-missing
COPY install/ubuntu_setup_tz.sh /install/ubuntu_setup_tz.sh
RUN bash /install/ubuntu_setup_tz.sh
-RUN apt-install-and-clear -y wget git sudo make parallel
+RUN apt-get update && \
+ apt-install-and-clear -y wget git sudo make parallel doxygen graphviz curl
shellcheck ca-certificates curl gnupg
-ENV TVM_VENV /venv/apache-tvm-py3.10
+ENV TVM_VENV=/venv/apache-tvm-py3.10
COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh 3.10
-ENV PATH ${TVM_VENV}/bin:$PATH
-ENV PYTHONNOUSERSITE 1 # Disable .local directory from affecting CI.
+ENV PATH=${TVM_VENV}/bin:$PATH
-RUN apt-get update && apt-install-and-clear -y doxygen graphviz curl shellcheck
+# Disable .local directory from affecting CI.
+ENV PYTHONNOUSERSITE=1
RUN pip3 install cpplint==1.6.1 pylint==2.17.2 mypy==0.902 black==22.12.0
flake8==3.9.2 blocklint==0.2.3 jinja2==3.0.3
-# Rust env (build early; takes a while)
-COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
-RUN bash /install/ubuntu_install_rust.sh
-ENV RUSTUP_HOME /opt/rust
-ENV CARGO_HOME /opt/rust
-ENV PATH $PATH:$CARGO_HOME/bin
-
# java deps for rat
COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
RUN bash /install/ubuntu_install_java.sh
diff --git a/docker/Dockerfile.ci_wasm b/docker/Dockerfile.ci_wasm
index b76913c830..e5ffb9ccfd 100644
--- a/docker/Dockerfile.ci_wasm
+++ b/docker/Dockerfile.ci_wasm
@@ -17,6 +17,7 @@
FROM ubuntu:22.04
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear
+COPY utils/download-and-verify.sh /usr/local/bin/download-and-verify
RUN apt-get update --fix-missing
@@ -26,34 +27,26 @@ RUN bash /install/ubuntu_setup_tz.sh
COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh
-COPY install/ubuntu_install_cmake_source.sh
/install/ubuntu_install_cmake_source.sh
-RUN bash /install/ubuntu_install_cmake_source.sh
+COPY install/ubuntu_install_cmake.sh /install/ubuntu_install_cmake.sh
+RUN bash /install/ubuntu_install_cmake.sh
COPY install/ubuntu_install_googletest.sh /install/ubuntu_install_googletest.sh
RUN bash /install/ubuntu_install_googletest.sh
-ENV TVM_VENV /venv/apache-tvm-py3.10
+ENV TVM_VENV=/venv/apache-tvm-py3.10
COPY python/bootstrap/lockfiles /install/python/bootstrap/lockfiles
COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh 3.10
-ENV PATH ${TVM_VENV}/bin:$PATH
-ENV PYTHONNOUSERSITE 1 # Disable .local directory from affecting CI.
+ENV PATH=${TVM_VENV}/bin:$PATH
+
+# Disable .local directory from affecting CI.
+ENV PYTHONNOUSERSITE=1
COPY install/ubuntu_install_python_package.sh
/install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
-# Rust env (build early; takes a while)
-COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
-RUN bash /install/ubuntu_install_rust.sh
-ENV RUSTUP_HOME /opt/rust
-ENV CARGO_HOME /opt/rust
-ENV PATH $PATH:$CARGO_HOME/bin
-
-COPY install/ubuntu2204_install_llvm.sh /install/ubuntu2204_install_llvm.sh
-RUN bash /install/ubuntu2204_install_llvm.sh
-
-COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
-RUN bash /install/ubuntu_install_java.sh
+COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh
+RUN bash /install/ubuntu_install_llvm.sh
COPY install/ubuntu_install_nodejs.sh /install/ubuntu_install_nodejs.sh
RUN bash /install/ubuntu_install_nodejs.sh
@@ -70,4 +63,4 @@ ENV EM_LLVM_ROOT=${EMSDK}/upstream/bin
# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh
-ENV PATH /opt/sccache:$PATH
+ENV PATH=/opt/sccache:$PATH
diff --git a/docker/install/ubuntu2004_install_core.sh
b/docker/install/ubuntu2004_install_core.sh
deleted file mode 100644
index 890510e4f9..0000000000
--- a/docker/install/ubuntu2004_install_core.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-# Used for debugging RVM build
-set -x
-set -o pipefail
-
-# install libraries for building c++ core on ubuntu
-apt-get update && apt-install-and-clear -y --no-install-recommends \
- apt-transport-https \
- ca-certificates \
- curl \
- g++ \
- gdb \
- git \
- graphviz \
- libcurl4-openssl-dev \
- libssl-dev \
- libtinfo-dev \
- libz-dev \
- make \
- ninja-build \
- pkg-config \
- sudo \
- unzip \
- wget
diff --git a/docker/install/ubuntu2004_install_python.sh
b/docker/install/ubuntu2004_install_python.sh
deleted file mode 100755
index 33f7c90ada..0000000000
--- a/docker/install/ubuntu2004_install_python.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-
-cleanup() {
- rm -rf base-requirements.txt
-}
-
-trap cleanup 0
-
-# Install python and pip. Don't modify this to add Python package dependencies,
-# instead modify install_python_package.sh
-apt-get update
-apt-install-and-clear -y python3.9 python3.9-dev python3-pip
-update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
-
-# Pin pip and setuptools versions
-# Hashes generated via:
-# $ pip download <package>==<version>
-# $ pip hash --algorithm sha256 <package>.whl
-cat <<EOF > base-requirements.txt
-pip==24.2
--hash=sha256:2cd581cf58ab7fcfca4ce8efa6dcacd0de5bf8d0a3eb9ec927e07405f4d9e2a2
-setuptools==75.1.0
--hash=sha256:35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2
-EOF
-pip3 install -r base-requirements.txt
diff --git a/docker/install/ubuntu2004_install_python_package.sh
b/docker/install/ubuntu2004_install_python_package.sh
deleted file mode 100644
index 7bb75f718c..0000000000
--- a/docker/install/ubuntu2004_install_python_package.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-# install libraries for python package on ubuntu
-pip3 install --upgrade \
- "Pygments>=2.4.0" \
- cloudpickle \
- cython \
- mypy \
- numpy==1.21.* \
- orderedset \
- packaging \
- Pillow==9.1.0 \
- psutil \
- pytest \
-
git+https://github.com/tlc-pack/tlcpack-sphinx-addon.git@768ec1dce349fe4708f6ad68be1ebb3f3dabafa1
\
- pytest-profiling \
- pytest-xdist \
- pytest-rerunfailures==10.2 \
- requests \
- Jinja2 \
- junitparser==2.4.2 \
- six \
- tornado \
- "ml_dtypes>=0.5.1"
diff --git a/docker/install/ubuntu2004_install_redis.sh
b/docker/install/ubuntu2004_install_redis.sh
deleted file mode 100644
index 1cbccfeac7..0000000000
--- a/docker/install/ubuntu2004_install_redis.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-pip3 install \
- redis-server==6.0.9 \
- scipy==1.9.0 \
- xgboost==1.4.2
diff --git a/docker/install/ubuntu2204_install_llvm.sh
b/docker/install/ubuntu2204_install_llvm.sh
deleted file mode 100644
index fa73ec6fbb..0000000000
--- a/docker/install/ubuntu2204_install_llvm.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main\
- >> /etc/apt/sources.list.d/llvm.list
-
-echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main\
- >> /etc/apt/sources.list.d/llvm.list
-
-echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main\
- >> /etc/apt/sources.list.d/llvm.list
-
-echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy main\
- >> /etc/apt/sources.list.d/llvm.list
-
-wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
-apt-get update && apt-install-and-clear -y \
- llvm-15 llvm-16 llvm-17\
- clang-15 libclang-15-dev \
- clang-16 libclang-16-dev libpolly-16-dev \
- clang-17 libclang-17-dev libpolly-17-dev libzstd-dev
diff --git a/docker/install/ubuntu_install_aprofile_aem.sh
b/docker/install/ubuntu_install_aprofile_aem.sh
index 4288cded0b..bbcc9a1d64 100755
--- a/docker/install/ubuntu_install_aprofile_aem.sh
+++ b/docker/install/ubuntu_install_aprofile_aem.sh
@@ -39,16 +39,16 @@
gcc_url="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/
gcc_sha="7fe7b8548258f079d6ce9be9144d2a10bd2bf93b551dafbf20fe7f2e44e014b8"
gcc_tar="arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz"
mkdir -p $gcc_install_dir
-curl --retry 64 -sSL $gcc_url -o $gcc_tar
-echo "$gcc_sha $gcc_tar" | sha256sum --check
+download-and-verify "$gcc_url" "$gcc_tar" sha256 "$gcc_sha" 64
tar -xf $gcc_tar -C $gcc_install_dir --strip-components=1
# Download FVP
fvp_dir="/opt/arm/fvp"
fvp_url="https://developer.arm.com/-/media/Files/downloads/ecosystem-models/FVP_Base_RevC-2xAEMvA_11.24_11_Linux64.tgz"
fvp_sha="0f132334834cbc66889a62dd72057c976d7c7dfcfeec21799e9c78fb2ce24720"
-curl --retry 64 -sSL $fvp_url -o fvp.tgz
-echo "$fvp_sha fvp.tgz" | sha256sum --check
+download-and-verify "$fvp_url" "fvp.tgz" sha256 "$fvp_sha" 64
mkdir -p "$fvp_dir"
tar -xzf fvp.tgz -C "$fvp_dir"
rm -rf doc # Remove some documentation bundled with the package
+
+popd
diff --git a/docker/install/ubuntu_install_clang_format.sh
b/docker/install/ubuntu_install_clang_format.sh
index 58510866ec..5f2dfa6069 100644
--- a/docker/install/ubuntu_install_clang_format.sh
+++ b/docker/install/ubuntu_install_clang_format.sh
@@ -20,10 +20,12 @@ set -e
set -u
set -o pipefail
-echo deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-15 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-15 main\
- >> /etc/apt/sources.list.d/llvm.list
+wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key \
+ | gpg --dearmor -o /usr/share/keyrings/llvm-archive.gpg
+
+cat > /etc/apt/sources.list.d/llvm.list <<'EOF'
+deb [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
+deb-src [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
+EOF
-wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-get update && apt-install-and-clear -y clang-format-15
diff --git a/docker/install/ubuntu_install_cmake.sh
b/docker/install/ubuntu_install_cmake.sh
new file mode 100644
index 0000000000..d2a6c3c60d
--- /dev/null
+++ b/docker/install/ubuntu_install_cmake.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -u
+set -o pipefail
+
+CMAKE_VERSION="3.31.11"
+CMAKE_SHA256_X86_64="d815c10cf54e8e122088b3bb25ea6b4010fb96b7ad6e1ad3fdef75be3d996b0b"
+CMAKE_SHA256_AARCH64="faef5420c3853d0e10a3862a0d3c71b40ffc2de36fc0ef0bcc5c896cf18f240f"
+
+case "$(uname -m)" in
+x86_64)
+ CMAKE_ARCH="x86_64"
+ CMAKE_SHA256="$CMAKE_SHA256_X86_64"
+ ;;
+aarch64|arm64)
+ CMAKE_ARCH="aarch64"
+ CMAKE_SHA256="$CMAKE_SHA256_AARCH64"
+ ;;
+*)
+ echo "Unsupported architecture: $(uname -m)"
+ exit 1
+ ;;
+esac
+
+v=$(echo "$CMAKE_VERSION" | sed 's/\(.*\)\..*/\1/g')
+CMAKE_PKG="cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}.tar.gz"
+CMAKE_URL="https://cmake.org/files/v${v}/${CMAKE_PKG}"
+
+TMP_DIR=$(mktemp -d)
+cleanup() {
+ rm -rf "$TMP_DIR"
+}
+trap cleanup 0
+
+echo "Installing cmake ${CMAKE_VERSION} (${CMAKE_ARCH})"
+pushd "$TMP_DIR"
+ download-and-verify "$CMAKE_URL" "$CMAKE_PKG" sha256 "$CMAKE_SHA256"
+
+ mkdir -p /opt/cmake
+ tar -xzf "$CMAKE_PKG" -C /opt/cmake
+
+ CMAKE_DIR="/opt/cmake/cmake-${CMAKE_VERSION}-linux-${CMAKE_ARCH}"
+ ln -sf "${CMAKE_DIR}/bin/cmake" /usr/local/bin/cmake
+ ln -sf "${CMAKE_DIR}/bin/ctest" /usr/local/bin/ctest
+ ln -sf "${CMAKE_DIR}/bin/cpack" /usr/local/bin/cpack
+popd
diff --git a/docker/install/ubuntu_install_cmake_source.sh
b/docker/install/ubuntu_install_cmake_source.sh
deleted file mode 100755
index 42f17f9ece..0000000000
--- a/docker/install/ubuntu_install_cmake_source.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-CMAKE_VERSION="3.30.4"
-CMAKE_SHA256="c759c97274f1e7aaaafcb1f0d261f9de9bf3a5d6ecb7e2df616324a46fe704b2"
-
-# parse argument
-CMAKE_VERSION=${1:-$CMAKE_VERSION}
-CMAKE_SHA256=${2:-$CMAKE_SHA256}
-
-v=$(echo $CMAKE_VERSION | sed 's/\(.*\)\..*/\1/g')
-echo "Installing cmake $CMAKE_VERSION ($v)"
-wget https://cmake.org/files/v${v}/cmake-${CMAKE_VERSION}.tar.gz
-echo "$CMAKE_SHA256" cmake-${CMAKE_VERSION}.tar.gz | sha256sum -c
-tar xvf cmake-${CMAKE_VERSION}.tar.gz
-pushd cmake-${CMAKE_VERSION}
- ./bootstrap
- make -j$(nproc)
- make install
-popd
-rm -rf cmake-${CMAKE_VERSION} cmake-${CMAKE_VERSION}.tar.gz
diff --git a/docker/install/ubuntu_install_dnnl.sh
b/docker/install/ubuntu_install_dnnl.sh
index 5aaf3be7fb..42c87fb64b 100755
--- a/docker/install/ubuntu_install_dnnl.sh
+++ b/docker/install/ubuntu_install_dnnl.sh
@@ -20,8 +20,12 @@ set -e
set -u
set -o pipefail
-pre_dir=`pwd`
tmpdir=$(mktemp -d)
+cleanup()
+{
+ rm -rf "${tmpdir}"
+}
+trap cleanup 0
rls_tag="v2.6"
@@ -35,14 +39,10 @@
archive_hash="4cb7b80bfe16920bc096e18e7d8caa56b9ab7a4dab2a091a230bcf562c09533392
cd "${tmpdir}"
-curl -sL "${archive_url}" -o "${archive_name}"
-echo "$archive_hash" ${archive_name} | sha512sum -c
+download-and-verify "${archive_url}" "${archive_name}" sha512 "${archive_hash}"
tar xf "${archive_name}"
cd "${archive_folder}"
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib
-make -j"$(nproc)"
-make install
-
-cd ${pre_dir}
-rm -rf "${tmpdir}"
+cmake --build . --parallel "$(( $(nproc) - 1 ))"
+cmake --install .
diff --git a/docker/install/ubuntu_install_emscripten.sh
b/docker/install/ubuntu_install_emscripten.sh
index 98331d2cbd..dda27a0886 100755
--- a/docker/install/ubuntu_install_emscripten.sh
+++ b/docker/install/ubuntu_install_emscripten.sh
@@ -23,5 +23,5 @@ set -o pipefail
cd /
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
-./emsdk install 3.1.51
-./emsdk activate 3.1.51
+./emsdk install 4.0.23
+./emsdk activate 4.0.23
diff --git a/docker/install/ubuntu_install_golang.sh
b/docker/install/ubuntu_install_golang.sh
deleted file mode 100755
index a829e10110..0000000000
--- a/docker/install/ubuntu_install_golang.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-#install the necessary dependencies for golang build
-apt-get update
-apt-install-and-clear -y golang-1.18-go golang-1.18-doc golint
diff --git a/docker/install/ubuntu_install_googletest.sh
b/docker/install/ubuntu_install_googletest.sh
index 9a3473da4e..3c24cd6bfa 100755
--- a/docker/install/ubuntu_install_googletest.sh
+++ b/docker/install/ubuntu_install_googletest.sh
@@ -47,8 +47,7 @@
archive_hash="10f10ed771efc64a1d8234a7e4801838a468f8990e5d6d8fcf63e89f8d1455c4f9
cd "$tmpdir"
-curl -sL "${archive_url}" -o "${archive_name}"
-echo "$archive_hash" ${archive_name} | sha512sum -c
+download-and-verify "${archive_url}" "${archive_name}" sha512 "${archive_hash}"
tar xf "${archive_name}" --strip-components=1
mkdir build
diff --git a/docker/install/ubuntu_install_libtorch.sh
b/docker/install/ubuntu_install_libtorch.sh
index 5228938c21..96cacf4852 100755
--- a/docker/install/ubuntu_install_libtorch.sh
+++ b/docker/install/ubuntu_install_libtorch.sh
@@ -20,8 +20,17 @@ set -e
set -u
set -o pipefail
-pushd /usr/local/
-wget -q
https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip
-unzip libtorch-cxx11-abi-shared-with-deps-2.0.0+cpu.zip
-# now it is in /usr/local/libtorch
-popd
+LIBTORCH_VERSION="2.0.0"
+LIBTORCH_ARCHIVE="libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}+cpu.zip"
+LIBTORCH_URL="https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${LIBTORCH_VERSION}%2Bcpu.zip"
+LIBTORCH_SHA256="2d67cff381186f2a01140348d2da7ab35d2e526c5703f4a8312c9428bef6df88"
+
+TMP_DIR="$(mktemp -d)"
+cleanup() {
+ rm -rf "${TMP_DIR}"
+}
+trap cleanup 0
+
+download-and-verify "${LIBTORCH_URL}" "${TMP_DIR}/${LIBTORCH_ARCHIVE}" sha256
"${LIBTORCH_SHA256}"
+
+unzip -d /usr/local "${TMP_DIR}/${LIBTORCH_ARCHIVE}"
diff --git a/docker/install/ubuntu_install_llvm.sh
b/docker/install/ubuntu_install_llvm.sh
old mode 100755
new mode 100644
index c8108c31b5..33c69d6c70
--- a/docker/install/ubuntu_install_llvm.sh
+++ b/docker/install/ubuntu_install_llvm.sh
@@ -16,33 +16,26 @@
# specific language governing permissions and limitations
# under the License.
-set -euxo pipefail
+set -e
+set -u
+set -o pipefail
-apt-get update
-apt-install-and-clear -y gnupg
+wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key \
+ | gpg --dearmor -o /usr/share/keyrings/llvm-archive.gpg
-echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main\
- >> /etc/apt/sources.list.d/llvm.list
+cat > /etc/apt/sources.list.d/llvm.list <<'EOF'
+deb [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
+deb-src [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main
+deb [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main
+deb-src [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main
+deb [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main
+deb-src [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main
+deb [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy main
+deb-src [signed-by=/usr/share/keyrings/llvm-archive.gpg]
http://apt.llvm.org/jammy/ llvm-toolchain-jammy main
+EOF
-echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main\
- >> /etc/apt/sources.list.d/llvm.list
-
-echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main\
- >> /etc/apt/sources.list.d/llvm.list
-
-echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal main\
- >> /etc/apt/sources.list.d/llvm.list
-echo deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main\
- >> /etc/apt/sources.list.d/llvm.list
-
-wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
-apt-install-and-clear -y llvm-12 llvm-11 llvm-10 \
- clang-12 libclang-12-dev \
- clang-11 libclang-11-dev \
- clang-10 libclang-10-dev
+apt-get update && apt-install-and-clear -y \
+ llvm-15 llvm-16 llvm-17\
+ clang-15 libclang-15-dev \
+ clang-16 libclang-16-dev libpolly-16-dev \
+ clang-17 libclang-17-dev libpolly-17-dev libzstd-dev
diff --git a/docker/install/ubuntu_install_nodejs.sh
b/docker/install/ubuntu_install_nodejs.sh
index f3697f5141..130620a441 100755
--- a/docker/install/ubuntu_install_nodejs.sh
+++ b/docker/install/ubuntu_install_nodejs.sh
@@ -20,13 +20,10 @@ set -e
set -u
set -o pipefail
+mkdir -p /usr/share/keyrings
+curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
+ | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
+echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg]
https://deb.nodesource.com/node_22.x nodistro main' \
+ > /etc/apt/sources.list.d/nodesource.list
apt-get update
-# Please do not remove 'curl' package installation from here, as this
-# script runs in some images (e.g. ci_lint) that keep a very minimal
-# set of packages installed by default.
-apt-install-and-clear -y curl
-
-# The node install script fetched and executed here will update the
-# apt source list, hence the second apt-get update --fix-missing is necessary.
-curl -s -S -L https://deb.nodesource.com/setup_16.x | bash -
apt-install-and-clear -y nodejs
diff --git a/docker/install/ubuntu_install_python.sh
b/docker/install/ubuntu_install_python.sh
index 0bc9a86409..b8828e5e41 100755
--- a/docker/install/ubuntu_install_python.sh
+++ b/docker/install/ubuntu_install_python.sh
@@ -34,9 +34,9 @@ fi
PYTHON_VERSION=$1
case "$PYTHON_VERSION" in
- 3.7|3.8|3.9|3.10|3.11) ;;
+ 3.10|3.11) ;;
*)
- echo "Only 3.7, 3.8, 3.9, 3.10 and 3.11 versions are supported in this
script."
+ echo "Only 3.10 and 3.11 versions are supported in this script."
exit -1
;;
esac
@@ -44,23 +44,12 @@ esac
apt-get update
# Ensure lsb-release is installed.
-apt-install-and-clear -y \
- lsb-core
-
-apt-install-and-clear -y software-properties-common
+apt-install-and-clear -y lsb-core software-properties-common
release=$(lsb_release -sc)
case "${release}" in
- bionic)
- [ "${PYTHON_VERSION}" == "3.8" ] && add-apt-repository -y
ppa:deadsnakes/ppa
- ;;
- focal)
- [ "${PYTHON_VERSION}" == "3.7" ] && add-apt-repository -y
ppa:deadsnakes/ppa
- ;;
jammy)
- if [ "${PYTHON_VERSION}" == "3.8" ] || \
- [ "${PYTHON_VERSION}" == "3.9" ] || \
- [ "${PYTHON_VERSION}" == "3.10" ] || \
+ if [ "${PYTHON_VERSION}" == "3.10" ] || \
[ "${PYTHON_VERSION}" == "3.11" ]; then
add-apt-repository -y ppa:deadsnakes/ppa
fi
diff --git a/docker/install/ubuntu_install_python_package.sh
b/docker/install/ubuntu_install_python_package.sh
index 819e1dac02..c715619b58 100755
--- a/docker/install/ubuntu_install_python_package.sh
+++ b/docker/install/ubuntu_install_python_package.sh
@@ -26,7 +26,7 @@ pip3 install --upgrade \
cloudpickle \
cython \
mypy \
- numpy==1.21.* \
+ numpy==1.26.* \
orderedset \
packaging \
Pillow==12.1.1 \
diff --git a/docker/install/ubuntu_install_rat.sh
b/docker/install/ubuntu_install_rat.sh
index 40fff85b36..d0b10023b3 100755
--- a/docker/install/ubuntu_install_rat.sh
+++ b/docker/install/ubuntu_install_rat.sh
@@ -20,8 +20,19 @@ set -e
set -u
set -o pipefail
-cd /tmp
-wget -q
https://archive.apache.org/dist/creadur/apache-rat-0.12/apache-rat-0.12-bin.tar.gz
-tar xf apache-rat-0.12-bin.tar.gz
-mv apache-rat-0.12/apache-rat-0.12.jar /bin/apache-rat.jar
-rm -rf apache-rat-0.12-bin.tar.gz apache-rat-0.12
+WORK_DIR="$(mktemp -d)"
+cleanup() {
+ rm -rf "${WORK_DIR}"
+}
+trap cleanup 0
+
+cd "${WORK_DIR}"
+RAT_VERSION="0.17"
+RAT_ARCHIVE="apache-rat-${RAT_VERSION}-bin.tar.gz"
+RAT_BASE_URL="https://downloads.apache.org/creadur/apache-rat-${RAT_VERSION}"
+RAT_SHA512="32848673dc4fb639c33ad85172dfa9d7a4441a0144e407771c9f7eb6a9a0b7a9b557b9722af968500fae84a6e60775449d538e36e342f786f20945b1645294a0"
+
+download-and-verify "${RAT_BASE_URL}/${RAT_ARCHIVE}" "${RAT_ARCHIVE}" sha512
"${RAT_SHA512}"
+
+tar xf "${RAT_ARCHIVE}"
+mv "apache-rat-${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar"
/bin/apache-rat.jar
diff --git a/docker/install/ubuntu_install_rocm.sh
b/docker/install/ubuntu_install_rocm.sh
index 6dc530f362..ff51f4c124 100755
--- a/docker/install/ubuntu_install_rocm.sh
+++ b/docker/install/ubuntu_install_rocm.sh
@@ -21,8 +21,10 @@ set -u
set -o pipefail
# Install ROCm cross compilation toolchain.
-wget -qO - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
-echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.3 jammy main' | sudo
tee /etc/apt/sources.list.d/rocm.list
+wget -qO - https://repo.radeon.com/rocm/rocm.gpg.key \
+ | gpg --dearmor -o /usr/share/keyrings/rocm.gpg
+echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/rocm.gpg]
https://repo.radeon.com/rocm/apt/5.3 jammy main' \
+ > /etc/apt/sources.list.d/rocm.list
apt-get update && apt-install-and-clear -y \
rocm-dev5.3.0 \
lld-15
diff --git a/docker/install/ubuntu_install_sbt.sh
b/docker/install/ubuntu_install_sbt.sh
deleted file mode 100755
index d27c9b7352..0000000000
--- a/docker/install/ubuntu_install_sbt.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-set -u
-set -o pipefail
-
-# The https:// source added below required an apt https transport
-# support.
-apt-get update && apt-install-and-clear -y apt-transport-https
-
-# Install the necessary dependencies for sbt
-echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee
/etc/apt/sources.list.d/sbt.list
-echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee
/etc/apt/sources.list.d/sbt_old.list
-apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv
2EE0EA64E40A89B84B2DF73499E82A75642AC823
-
-# Note: The settings in vta/hardware/chisel/project/build.properties
-# file determines required sbt version.
-apt-get update && apt-install-and-clear -y sbt=1.1.1
diff --git a/docker/install/ubuntu_install_sccache.sh
b/docker/install/ubuntu_install_sccache.sh
index 07a7d48b1d..3e49058ebf 100755
--- a/docker/install/ubuntu_install_sccache.sh
+++ b/docker/install/ubuntu_install_sccache.sh
@@ -20,20 +20,53 @@ set -e
set -u
set -o pipefail
-cargo install --version 0.7.* sccache
+workdir="$(mktemp -d)"
+
+cleanup()
+{
+ rm -rf "$workdir"
+}
+
+trap cleanup 0
+
+SCCACHE_VERSION="v0.14.0"
+SCCACHE_BASE_URL="https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}"
+
+arch="$(uname -m)"
+case "${arch}" in
+ x86_64)
+ target="x86_64-unknown-linux-musl"
+
expected_sha256="8424b38cda4ecce616a1557d81328f3d7c96503a171eab79942fad618b42af44"
+ ;;
+ aarch64|arm64)
+ target="aarch64-unknown-linux-musl"
+
expected_sha256="62a6c942c47c93333bc0174704800cef7edfa0416d08e1356c1d3e39f0b462f2"
+ ;;
+ *)
+ echo "Unsupported architecture '${arch}' for prebuilt sccache
${SCCACHE_VERSION}" >&2
+ exit 1
+ ;;
+esac
+
+archive="sccache-${SCCACHE_VERSION}-${target}.tar.gz"
+
+download-and-verify "${SCCACHE_BASE_URL}/${archive}" "${workdir}/${archive}"
sha256 "${expected_sha256}"
+
+tar -xzf "${workdir}/${archive}" -C "${workdir}"
+
+mkdir -p /opt/sccache
+install -m 0755 "${workdir}/sccache-${SCCACHE_VERSION}-${target}/sccache"
/opt/sccache/sccache
# The docs specifically recommend hard links:
https://github.com/mozilla/sccache#known-caveats
-mkdir /opt/sccache
-ln "$(which sccache)" /opt/sccache/cc
-ln "$(which sccache)" /opt/sccache/c++
+ln -f /opt/sccache/sccache /opt/sccache/cc
+ln -f /opt/sccache/sccache /opt/sccache/c++
# Only add clang if it's on the PATH
-if command -v clang &> /dev/null
+if command -v clang >/dev/null 2>&1
then
- ln "$(which sccache)" /opt/sccache/clang
- ln "$(which sccache)" /opt/sccache/clang++
+ ln -f /opt/sccache/sccache /opt/sccache/clang
+ ln -f /opt/sccache/sccache /opt/sccache/clang++
fi
-
-# make rust usable by all users after install during container build
-chmod -R a+rw /opt/rust
+# make sccache usable by all users after install during container build
+chmod -R a+rw /opt/sccache
diff --git a/docker/install/ubuntu_install_tensorflow.sh
b/docker/install/ubuntu_install_tensorflow.sh
index 48e83ae2ff..98433469fa 100755
--- a/docker/install/ubuntu_install_tensorflow.sh
+++ b/docker/install/ubuntu_install_tensorflow.sh
@@ -20,10 +20,4 @@ set -e
set -u
set -o pipefail
-pip3 install \
- keras==3.5.0 \
- tensorflow==2.18.0
-
-# tensorflow 2.18.0 requires ml-dtypes<0.5.0,>=0.4.0
-# ml_dtypes needs to be installed after tensorflow
-pip3 install ml_dtypes==0.5.1 --no-deps
+pip3 install tensorflow==2.19.0
diff --git a/docker/install/ubuntu_install_tensorflow_aarch64.sh
b/docker/install/ubuntu_install_tensorflow_aarch64.sh
index fcd912a447..327aae7902 100755
--- a/docker/install/ubuntu_install_tensorflow_aarch64.sh
+++ b/docker/install/ubuntu_install_tensorflow_aarch64.sh
@@ -21,9 +21,7 @@ set -euxo pipefail
# Build dependencies
apt-install-and-clear -y --no-install-recommends libhdf5-dev
-# We're only using the TensorFlow wheel snapshot here as the
-# h5py wheel tries to use the wrong .so file
+# TensorFlow package versions are aligned with ubuntu_install_tensorflow.sh.
pip3 install \
- numpy==1.23.5 \
- keras==2.9 \
- tensorflow-aarch64~=2.9.3
+ numpy==1.26.* \
+ tensorflow==2.19.0
diff --git a/docker/install/ubuntu_install_tflite.sh
b/docker/install/ubuntu_install_tflite.sh
index 8bb7f87deb..050a611880 100755
--- a/docker/install/ubuntu_install_tflite.sh
+++ b/docker/install/ubuntu_install_tflite.sh
@@ -29,7 +29,8 @@ TENSORFLOW_VERSION=$(python3 -c "import tensorflow;
print(tensorflow.__version__
git clone --branch=v24.3.25 --depth=1 --recursive
https://github.com/google/flatbuffers.git
cd flatbuffers
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS="-Wno-class-memaccess"
-make install -j8
+cmake --build . --parallel "$(( $(nproc) - 1 ))"
+cmake --install .
cd ..
# Install flatbuffers python packages.
@@ -46,7 +47,7 @@ cmake \
-DTFLITE_ENABLE_XNNPACK=OFF \
/tensorflow/tensorflow/lite
-cmake --build .
+cmake --build . --parallel "$(( $(nproc) - 1 ))"
cd -
diff --git a/docker/install/ubuntu_install_vulkan.sh
b/docker/install/ubuntu_install_vulkan.sh
index 9bcc47bb14..6d91de249a 100755
--- a/docker/install/ubuntu_install_vulkan.sh
+++ b/docker/install/ubuntu_install_vulkan.sh
@@ -22,7 +22,12 @@ set -o pipefail
VULKAN_VERSION=1.4.309
UBUNTU_VERSION=jammy
-wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add
-
-wget -qO
/etc/apt/sources.list.d/lunarg-vulkan-${VULKAN_VERSION}-${UBUNTU_VERSION}.list
http://packages.lunarg.com/vulkan/${VULKAN_VERSION}/lunarg-vulkan-${VULKAN_VERSION}-${UBUNTU_VERSION}.list
+wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc \
+ | gpg --dearmor -o /usr/share/keyrings/lunarg-vulkan.gpg
+wget -qO /tmp/lunarg-vulkan.list \
+
http://packages.lunarg.com/vulkan/${VULKAN_VERSION}/lunarg-vulkan-${VULKAN_VERSION}-${UBUNTU_VERSION}.list
+sed -E 's|^deb(-src)? |deb\1 [signed-by=/usr/share/keyrings/lunarg-vulkan.gpg]
|' /tmp/lunarg-vulkan.list \
+ >
/etc/apt/sources.list.d/lunarg-vulkan-${VULKAN_VERSION}-${UBUNTU_VERSION}.list
+rm -f /tmp/lunarg-vulkan.list
apt-get update
apt-install-and-clear -y vulkan-sdk
diff --git a/docker/install/ubuntu_install_wasmtime.sh
b/docker/install/ubuntu_install_wasmtime.sh
index 72b7664af4..db9bd0b1c3 100755
--- a/docker/install/ubuntu_install_wasmtime.sh
+++ b/docker/install/ubuntu_install_wasmtime.sh
@@ -18,12 +18,36 @@
set -euxo pipefail
-# install wasmtime (note: requires ubuntu_install_rust.sh to run first)
-apt-install-and-clear -y --no-install-recommends libc6-dev-i386
-export WASMTIME_HOME=/opt/wasmtime
-curl https://wasmtime.dev/install.sh -sSf | bash
-export PATH="${WASMTIME_HOME}/bin:${PATH}"
-rustup target add wasm32-wasip1
+WASMTIME_VERSION="v41.0.3"
+WASMTIME_HOME=/opt/wasmtime
-# make rust usable by all users after install during container build
-chmod -R a+rw /opt/rust
+case "$(uname -m)" in
+ x86_64)
+ WASMTIME_ARCH="x86_64-linux"
+
WASMTIME_SHA256="797d0a4f790e79c33ccaf43bfe413f077fff951e3a35145afe7b5a8324f14644"
+ ;;
+ aarch64|arm64)
+ WASMTIME_ARCH="aarch64-linux"
+
WASMTIME_SHA256="1dd1f69089eeefc3826f38463f8375d6ff2e59684a2a85b44a6622516d0a5677"
+ ;;
+ *)
+ echo "Unsupported architecture: $(uname -m)"
+ exit 1
+ ;;
+esac
+
+WASMTIME_TARBALL="wasmtime-${WASMTIME_VERSION}-${WASMTIME_ARCH}.tar.xz"
+WASMTIME_URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${WASMTIME_TARBALL}"
+
+TMP_DIR="$(mktemp -d)"
+cleanup() {
+ rm -rf "${TMP_DIR}"
+}
+trap cleanup 0
+
+rm -rf "${WASMTIME_HOME}"
+mkdir -p "${WASMTIME_HOME}"
+download-and-verify "${WASMTIME_URL}" "${TMP_DIR}/${WASMTIME_TARBALL}" sha256
"${WASMTIME_SHA256}"
+
+tar -xJf "${TMP_DIR}/${WASMTIME_TARBALL}" -C "${WASMTIME_HOME}"
--strip-components=1
+ln -sf "${WASMTIME_HOME}/wasmtime" /usr/local/bin/wasmtime
diff --git a/docker/install/ubuntu_install_rust.sh
b/docker/utils/download-and-verify.sh
similarity index 51%
rename from docker/install/ubuntu_install_rust.sh
rename to docker/utils/download-and-verify.sh
index b19cdd1a58..7c4deb4335 100755
--- a/docker/install/ubuntu_install_rust.sh
+++ b/docker/utils/download-and-verify.sh
@@ -16,24 +16,35 @@
# specific language governing permissions and limitations
# under the License.
-set -euxo pipefail
+# Download a file with curl and verify its checksum (sha256 or sha512).
+if [[ "$#" -lt 4 || "$#" -gt 5 ]]; then
+ echo "Usage: $0 URL OUTPUT_PATH CHECKSUM_ALGO EXPECTED_CHECKSUM [RETRIES]"
>&2
+ exit 2
+fi
-export RUSTUP_HOME=/opt/rust
-export CARGO_HOME=/opt/rust
+url="$1"
+output_path="$2"
+checksum_algo="$3"
+expected_checksum="$4"
+retries="${5:-0}"
-# this rustc is one supported by the installed version of rust-sgx-sdk
-HOST_ARG=
-if [ "$(getconf LONG_BIT)" == "32" ]; then
- # When building in the i386 docker image on a 64-bit host, rustup doesn't
- # correctly detect the arch to install for so set it manually
- HOST_ARG="--default-host i686-unknown-linux-gnu"
-fi
+case "${checksum_algo}" in
+ sha256)
+ checksum_bin="sha256sum"
+ ;;
+ sha512)
+ checksum_bin="sha512sum"
+ ;;
+ *)
+ echo "Unsupported checksum algorithm: ${checksum_algo}" >&2
+ exit 2
+ ;;
+esac
-# shellcheck disable=SC2086 # word splitting is intentional here
-curl -s -S -L https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
--profile minimal --default-toolchain stable $HOST_ARG
-export PATH=$CARGO_HOME/bin:$PATH
-rustup component add rustfmt
-rustup component add clippy
+if [ "${retries}" -gt 0 ]; then
+ curl --retry "${retries}" -fsSL "${url}" -o "${output_path}"
+else
+ curl -fsSL "${url}" -o "${output_path}"
+fi
-# make rust usable by all users after install during container build
-chmod -R a+rw /opt/rust
+printf "%s %s\n" "${expected_checksum}" "${output_path}" | "${checksum_bin}"
-c -
diff --git a/web/package-lock.json b/web/package-lock.json
index 3a07d15216..56d80a0582 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -61,7 +61,6 @@
"integrity":
"sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/code-frame": "^7.28.6",
"@babel/generator": "^7.28.6",
@@ -1383,7 +1382,6 @@
"integrity":
"sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
"dev": true,
"license": "BSD-2-Clause",
- "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.62.0",
"@typescript-eslint/types": "5.62.0",
@@ -1567,7 +1565,6 @@
"integrity":
"sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -2047,7 +2044,6 @@
}
],
"license": "MIT",
- "peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.9.0",
"caniuse-lite": "^1.0.30001759",
@@ -2769,7 +2765,6 @@
"deprecated": "This version is no longer supported. Please see
https://eslint.org/version-support for other options.",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
@@ -6263,7 +6258,6 @@
"integrity":
"sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"rollup": "dist/bin/rollup"
},
@@ -7562,7 +7556,6 @@
"integrity":
"sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"dev": true,
"license": "Apache-2.0",
- "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"