|
78 | 78 | "2024.0.0", # Standalone OpenVINO |
79 | 79 | "3.2.6", # DCGM version |
80 | 80 | "0.5.3.post1", # vLLM version |
| 81 | + "3.10.13", # Python version |
81 | 82 | ) |
82 | 83 | } |
83 | 84 |
|
@@ -908,7 +909,7 @@ def install_dcgm_libraries(dcgm_version, target_machine): |
908 | 909 | ) |
909 | 910 |
|
910 | 911 |
|
911 | | -def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap): |
| 912 | +def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap, backends): |
912 | 913 | df = """ |
913 | 914 | ARG TRITON_VERSION={} |
914 | 915 | ARG TRITON_CONTAINER_VERSION={} |
@@ -988,6 +989,19 @@ def create_dockerfile_buildbase_rhel(ddir, dockerfile_name, argmap): |
988 | 989 | # && apt-get update -q=2 \\ |
989 | 990 | # && apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7* |
990 | 991 | """ |
| 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 | + |
991 | 1005 | if FLAGS.enable_gpu: |
992 | 1006 | df += install_dcgm_libraries(argmap["DCGM_VERSION"], target_machine()) |
993 | 1007 | df += """ |
@@ -1390,12 +1404,26 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach |
1390 | 1404 | # Add dependencies needed for python backend |
1391 | 1405 | if "python" in backends: |
1392 | 1406 | 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 | + |
1393 | 1420 | df += """ |
1394 | 1421 | # python3, python3-pip and some pip installs required for the python backend |
1395 | 1422 | RUN yum install -y \\ |
1396 | 1423 | libarchive-devel \\ |
1397 | | - python3-devel \\ |
1398 | 1424 | python3-pip \\ |
| 1425 | + openssl-devel \\ |
| 1426 | + readline-devel |
1399 | 1427 | && pip3 install --upgrade pip \\ |
1400 | 1428 | && pip3 install --upgrade \\ |
1401 | 1429 | wheel \\ |
@@ -1621,7 +1649,7 @@ def create_build_dockerfiles( |
1621 | 1649 |
|
1622 | 1650 | if target_platform() == "rhel": |
1623 | 1651 | create_dockerfile_buildbase_rhel( |
1624 | | - FLAGS.build_dir, "Dockerfile.buildbase", dockerfileargmap |
| 1652 | + FLAGS.build_dir, "Dockerfile.buildbase", dockerfileargmap, backends |
1625 | 1653 | ) |
1626 | 1654 | else: |
1627 | 1655 | create_dockerfile_buildbase( |
|
0 commit comments