Skip to content

Commit 6f7605d

Browse files
committed
Use python3.12
1 parent 9309f7f commit 6f7605d

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

build.py

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"2024.0.0", # Standalone OpenVINO
7979
"3.2.6", # DCGM version
8080
"0.5.3.post1", # vLLM version
81-
"3.10.13", # Python version
8281
)
8382
}
8483

@@ -909,7 +908,7 @@ def install_dcgm_libraries(dcgm_version, target_machine):
909908
)
910909

911910

912-
def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap, backends):
911+
def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap):
913912
df = """
914913
ARG TRITON_VERSION={}
915914
ARG TRITON_CONTAINER_VERSION={}
@@ -951,7 +950,7 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap, backends):
951950
libb64-devel \\
952951
gperftools-devel \\
953952
patchelf \\
954-
python3-devel \\
953+
python3.12-devel \\
955954
python3-pip \\
956955
python3-setuptools \\
957956
rapidjson-devel \\
@@ -989,19 +988,6 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap, backends):
989988
# && apt-get update -q=2 \\
990989
# && apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7*
991990
"""
992-
if "python" in backends:
993-
df += """
994-
# python3.10 is not available through yum for RHEL8. It must instead must be installed via pyenv.
995-
# Only copy out libpython3.1* so as to not overwrite the general libpython3.so lib.
996-
RUN curl https://pyenv.run | bash \\
997-
&& echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc \\
998-
&& echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc \\
999-
&& echo 'eval "$(pyenv init -)"' >> ~/.bashrc
1000-
RUN CONFIGURE_OPTS=\"--with-openssl=/usr/lib64\" && pyenv install {} \\
1001-
&& cp /root/.pyenv/versions/{}/lib/libpython3.1* /usr/lib64/""".format(
1002-
TRITON_VERSION_MAP[FLAGS.version][7], TRITON_VERSION_MAP[FLAGS.version][7]
1003-
)
1004-
1005991
if FLAGS.enable_gpu:
1006992
df += install_dcgm_libraries(argmap["DCGM_VERSION"], target_machine())
1007993
df += """
@@ -1404,22 +1390,10 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
14041390
# Add dependencies needed for python backend
14051391
if "python" in backends:
14061392
if target_platform() == "rhel":
1407-
df += """
1408-
# python3.10 is not available through yum for RHEL8. It must instead must be installed via pyenv.
1409-
# Only copy out libpython3.1* so as to not overwrite the general libpython3.so lib.
1410-
RUN curl https://pyenv.run | bash \\
1411-
&& echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc \\
1412-
&& echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc \\
1413-
&& echo 'eval "$(pyenv init -)"' >> ~/.bashrc
1414-
RUN CONFIGURE_OPTS=\"--with-openssl=/usr/lib64\" && pyenv install {} \\
1415-
&& cp /root/.pyenv/versions/{}/lib/libpython3.1* /usr/lib64/""".format(
1416-
TRITON_VERSION_MAP[FLAGS.version][7],
1417-
TRITON_VERSION_MAP[FLAGS.version][7],
1418-
)
1419-
14201393
df += """
14211394
# python3, python3-pip and some pip installs required for the python backend
14221395
RUN yum install -y \\
1396+
python3.12-devel \\
14231397
libarchive-devel \\
14241398
python3-pip \\
14251399
openssl-devel \\
@@ -1649,7 +1623,7 @@ def create_build_dockerfiles(
16491623

16501624
if target_platform() == "rhel":
16511625
create_dockerfile_buildbase_rhel(
1652-
FLAGS.build_dir, "Dockerfile.buildbase", dockerfileargmap, backends
1626+
FLAGS.build_dir, "Dockerfile.buildbase", dockerfileargmap
16531627
)
16541628
else:
16551629
create_dockerfile_buildbase(

0 commit comments

Comments
 (0)