Skip to content

Commit 2e8d033

Browse files
committed
Review comments
1 parent f0b04db commit 2e8d033

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

build.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"2024.0.0", # Standalone OpenVINO
7979
"3.2.6", # DCGM version
8080
"0.5.3.post1", # vLLM version
81-
"3.12.1", # RHEL Python version
81+
"3.12.3", # RHEL Python version
8282
)
8383
}
8484

@@ -1541,32 +1541,31 @@ def add_cpu_libs_to_linux_dockerfile(backends, target_machine):
15411541

15421542

15431543
def change_default_python_version_rhel(version):
1544-
# Example version 3.12.1 --> 3.12
1545-
major_minor_version = ".".join(version.split(".")[:2])
15461544
df = """
1545+
# The python library version available for install via 'yum install python3.X-devel' does not
1546+
# match the version of python inside the RHEL base container. This means that python packages
1547+
# installed within the container will not be picked up by the python backend stub process pybind
1548+
# bindings. It must instead must be installed via pyenv.
1549+
ENV PYENV_ROOT=/tmp/pyenv_build
1550+
RUN curl https://pyenv.run | bash
1551+
ENV PATH="${{PYENV_ROOT}}/bin:$PATH"
1552+
RUN eval "$(pyenv init -)"
1553+
RUN CONFIGURE_OPTS=\"--with-openssl=/usr/lib64\" && pyenv install {} \\
1554+
&& cp ${{PYENV_ROOT}}/versions/{}/lib/libpython3* /usr/lib64/""".format(
1555+
version, version
1556+
)
1557+
df += """
15471558
# RHEL image has several python versions. It's important
15481559
# to set the correct version, otherwise, packages that are
15491560
# pip installed will not be found during testing.
15501561
ENV PYVER {}
15511562
ENV PYTHONPATH /opt/python/v
1552-
RUN ln -sf /opt/python/cp${{PYVER/./}}* ${{PYTHONPATH}}
1563+
RUN ln -sf ${{PYENV_ROOT}}/versions/${{PYVER}}* ${{PYTHONPATH}}
15531564
ENV PYBIN ${{PYTHONPATH}}/bin
15541565
ENV PYTHON_BIN_PATH ${{PYBIN}}/python${{PYVER}}
15551566
ENV PATH ${{PYBIN}}:${{PATH}}
15561567
""".format(
1557-
major_minor_version
1558-
)
1559-
df += """
1560-
# The python library version available for install via 'yum install python3.X-devel' does not
1561-
# match the version of python inside the RHEL base container. This means that python packages
1562-
# installed within the container will not be picked up by the python backend stub process pybind
1563-
# bindings. It must instead must be installed via pyenv.
1564-
RUN curl https://pyenv.run | bash
1565-
ENV PATH="/root/.pyenv/bin:$PATH"
1566-
RUN eval "$(pyenv init -)"
1567-
RUN CONFIGURE_OPTS=\"--with-openssl=/usr/lib64\" && pyenv install {} \\
1568-
&& cp /root/.pyenv/versions/{}/lib/libpython3* /usr/lib64/""".format(
1569-
version, version
1568+
version
15701569
)
15711570
return df
15721571

0 commit comments

Comments
 (0)