From 8da06e8dd79150006eec009a02544f9bf72119cb Mon Sep 17 00:00:00 2001 From: Spolti Date: Tue, 25 Feb 2025 12:35:51 -0300 Subject: [PATCH] Upgrade python to 3.11 chore: Update python to 3.11 in preparation of UBI9 upgrade. Signed-off-by: Spolti --- Dockerfile | 10 ++++++---- model-mesh-triton-adapter/scripts/tf_pb.py | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d06c227..598a2441 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,12 @@ USER root ENV HOME=/root # Install build and dev tools -# NOTE: Require python38 to install pre-commit +# NOTE: Require python311 to install pre-commit RUN --mount=type=cache,target=/root/.cache/dnf:rw \ dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \ nodejs \ - python38 \ + python3.11 \ + python3.11-pip \ && ln -sf /usr/bin/python3 /usr/bin/python \ && ln -sf /usr/bin/pip3 /usr/bin/pip \ && true @@ -149,8 +150,9 @@ RUN --mount=type=cache,target=/root/.cache/microdnf:rw \ microdnf install --setopt=cachedir=/root/.cache/microdnf \ gcc \ gcc-c++ \ - python38-devel \ - python38 \ + python3.11-devel \ + python3.11 \ + python3.11-pip \ && ln -sf /usr/bin/python3 /usr/bin/python \ && ln -sf /usr/bin/pip3 /usr/bin/pip \ && true diff --git a/model-mesh-triton-adapter/scripts/tf_pb.py b/model-mesh-triton-adapter/scripts/tf_pb.py index 0ab53608..3ac987b6 100644 --- a/model-mesh-triton-adapter/scripts/tf_pb.py +++ b/model-mesh-triton-adapter/scripts/tf_pb.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import os import sys import time