Skip to content

Commit 4f98ebf

Browse files
authored
build(dependencies): Validate boost version (#8494)
1 parent d074a3b commit 4f98ebf

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Dockerfile.QA

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ RUN cd tritonbuild/identity && \
186186
make -j16 install
187187

188188
# L0_backend_python test require triton_shm_monitor
189+
ARG TRITON_BOOST_URL="https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz"
189190
RUN cd tritonbuild/python && \
190191
rm -rf install build && mkdir build && cd build && \
191192
cmake -DCMAKE_INSTALL_PREFIX:PATH=/workspace/tritonbuild/python/install \
192193
-DTRITON_REPO_ORGANIZATION:STRING=${TRITON_REPO_ORGANIZATION} \
193194
-DTRITON_COMMON_REPO_TAG:STRING=${TRITON_COMMON_REPO_TAG} \
194195
-DTRITON_CORE_REPO_TAG:STRING=${TRITON_CORE_REPO_TAG} \
196+
-DTRITON_BOOST_URL:STRING=${TRITON_BOOST_URL} \
195197
-DTRITON_BACKEND_REPO_TAG:STRING=${TRITON_BACKEND_REPO_TAG} .. && \
196198
make -j16 triton-shm-monitor install
197199

build.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,14 +1002,16 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap):
10021002
virtualenv \\
10031003
patchelf==0.17.2 \\
10041004
cmake==4.0.3
1005-
1005+
"""
1006+
df += f"""
10061007
# Install boost version >= 1.78 for boost::span
10071008
# Current libboost-dev apt packages are < 1.78, so install from tar.gz
1008-
RUN wget -O /tmp/boost.tar.gz \\
1009-
https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz \\
1009+
RUN wget -O /tmp/boost.tar.gz {FLAGS.boost_url} \\
1010+
&& sha256sum /tmp/boost.tar.gz | grep {FLAGS.boost_sha256} \\
10101011
&& (cd /tmp && tar xzf boost.tar.gz) \\
10111012
&& mv /tmp/boost_1_80_0/boost /usr/include/boost
10121013
"""
1014+
10131015
if FLAGS.enable_gpu:
10141016
df += install_dcgm_libraries(argmap["DCGM_VERSION"], target_machine())
10151017
df += """
@@ -1113,14 +1115,15 @@ def create_dockerfile_buildbase(ddir, dockerfile_name, argmap):
11131115
virtualenv \\
11141116
patchelf==0.17.2 \\
11151117
cmake==4.0.3
1118+
"""
11161119

1120+
df += f"""
11171121
# Install boost version >= 1.78 for boost::span
11181122
# Current libboost-dev apt packages are < 1.78, so install from tar.gz
1119-
RUN wget -O /tmp/boost.tar.gz \\
1120-
https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz \\
1123+
RUN wget -O /tmp/boost.tar.gz {FLAGS.boost_url} \\
1124+
&& sha256sum /tmp/boost.tar.gz | grep {FLAGS.boost_sha256} \\
11211125
&& (cd /tmp && tar xzf boost.tar.gz) \\
11221126
&& mv /tmp/boost_1_80_0/boost /usr/include/boost
1123-
11241127
"""
11251128

11261129
if FLAGS.enable_gpu:
@@ -2813,6 +2816,13 @@ def enable_all():
28132816
if FLAGS.build_secret is None:
28142817
FLAGS.build_secret = []
28152818

2819+
FLAGS.boost_url = os.getenv(
2820+
"TRITON_BOOST_URL",
2821+
"https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz",
2822+
)
2823+
FLAGS.boost_sha256 = (
2824+
"4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847"
2825+
)
28162826
# if --enable-all is specified, then update FLAGS to enable all
28172827
# settings, backends, repo-agents, caches, file systems, endpoints, etc.
28182828
if FLAGS.enable_all:

0 commit comments

Comments
 (0)