From 373d8225af42e9dbfc01431b46ff48be0eabae90 Mon Sep 17 00:00:00 2001 From: Mike Kruskal <62662355+mkruskal-google@users.noreply.github.com> Date: Tue, 16 Aug 2022 08:56:38 -0700 Subject: [PATCH] Upgrade python in benchmark kokoro build (#10415) * Fixing bad syntax * Revert runtime fix * Add python venv to use latest version --- kokoro/linux/benchmark/run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kokoro/linux/benchmark/run.sh b/kokoro/linux/benchmark/run.sh index efe09ca1cc..0641708625 100755 --- a/kokoro/linux/benchmark/run.sh +++ b/kokoro/linux/benchmark/run.sh @@ -12,6 +12,12 @@ set -ex export OUTPUT_DIR=testoutput repo_root="$(pwd)" +# Setup python virtual environment. +apt-get update -y +apt-get install -y --no-install-recommends python3 python3-venv +python3 -m venv venv +source venv/bin/activate + # TODO(jtattermusch): Add back support for benchmarking with tcmalloc for C++ and python. # This feature was removed since it used to use tcmalloc from https://github.com/gperftools/gperftools.git # which is very outdated. See https://github.com/protocolbuffers/protobuf/issues/8725.