|
78 | 78 | "2024.0.0", # Standalone OpenVINO |
79 | 79 | "3.2.6", # DCGM version |
80 | 80 | "0.5.3.post1", # vLLM version |
| 81 | + "3.12", # RHEL Python version |
81 | 82 | ) |
82 | 83 | } |
83 | 84 |
|
@@ -925,6 +926,7 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap): |
925 | 926 | ARG TRITON_VERSION |
926 | 927 | ARG TRITON_CONTAINER_VERSION |
927 | 928 | """ |
| 929 | + df += change_default_python_version_rhel(TRITON_VERSION_MAP[FLAGS.version][7]) |
928 | 930 | df += """ |
929 | 931 | # Install docker docker buildx |
930 | 932 | RUN yum install -y ca-certificates curl gnupg yum-utils \\ |
@@ -1390,14 +1392,17 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach |
1390 | 1392 | # Add dependencies needed for python backend |
1391 | 1393 | if "python" in backends: |
1392 | 1394 | if target_platform() == "rhel": |
| 1395 | + df += change_default_python_version_rhel( |
| 1396 | + TRITON_VERSION_MAP[FLAGS.version][7] |
| 1397 | + ) |
1393 | 1398 | df += """ |
1394 | 1399 | # python3, python3-pip and some pip installs required for the python backend |
1395 | 1400 | RUN yum install -y \\ |
1396 | 1401 | python3.12-devel \\ |
1397 | 1402 | libarchive-devel \\ |
1398 | 1403 | python3-pip \\ |
1399 | 1404 | openssl-devel \\ |
1400 | | - readline-devel |
| 1405 | + readline-devel \\ |
1401 | 1406 | && pip3 install --upgrade pip \\ |
1402 | 1407 | && pip3 install --upgrade \\ |
1403 | 1408 | wheel \\ |
@@ -1531,6 +1536,23 @@ def add_cpu_libs_to_linux_dockerfile(backends, target_machine): |
1531 | 1536 | return df |
1532 | 1537 |
|
1533 | 1538 |
|
| 1539 | +def change_default_python_version_rhel(version): |
| 1540 | + df = """ |
| 1541 | +# RHEL image has several python versions. It's important |
| 1542 | +# to set the correct version, otherwise, packages that are |
| 1543 | +# pip installed will not be found during testing. |
| 1544 | +ENV PYVER {} |
| 1545 | +ENV PYTHONPATH /opt/python/v |
| 1546 | +RUN ln -sf /opt/python/cp${{PYVER/./}}* ${{PYTHONPATH}} |
| 1547 | +ENV PYBIN ${{PYTHONPATH}}/bin |
| 1548 | +ENV PYTHON_BIN_PATH ${{PYBIN}}/python${{PYVER}} |
| 1549 | +ENV PATH ${{PYBIN}}:${{PATH}} |
| 1550 | +""".format( |
| 1551 | + version |
| 1552 | + ) |
| 1553 | + return df |
| 1554 | + |
| 1555 | + |
1534 | 1556 | def create_dockerfile_windows( |
1535 | 1557 | ddir, dockerfile_name, argmap, backends, repoagents, caches |
1536 | 1558 | ): |
|
0 commit comments