From 63598a27c7229dd5f9478efddecb39fc48994de2 Mon Sep 17 00:00:00 2001 From: krishung5 Date: Thu, 14 Nov 2024 11:58:56 -0800 Subject: [PATCH 1/3] Update miniconda version --- tools/gen_pb_exec_env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/gen_pb_exec_env.sh b/tools/gen_pb_exec_env.sh index d7fe86b..d569359 100755 --- a/tools/gen_pb_exec_env.sh +++ b/tools/gen_pb_exec_env.sh @@ -27,8 +27,8 @@ # install conda rm -rf ./miniconda -wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.3.1-0-Linux-x86_64.sh -bash Miniconda3-py310_23.3.1-0-Linux-x86_64.sh -p ./miniconda -b +wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.9.2-0-Linux-x86_64.sh +bash Miniconda3-py312_24.9.2-0-Linux-x86_64.sh -p ./miniconda -b eval "$(./miniconda/bin/conda shell.bash hook)" # create conda environment @@ -38,7 +38,7 @@ conda install -c conda-forge conda-pack -y # pre install step export PYTHONNOUSERSITE=True -conda install -c conda-forge libstdcxx-ng=12 -y +conda install -c conda-forge libstdcxx-ng=14 -y # install PyTorch conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia -y From 4487087a47e1ced9082c2427e044e1011e34b705 Mon Sep 17 00:00:00 2001 From: krishung5 Date: Thu, 14 Nov 2024 15:55:24 -0800 Subject: [PATCH 2/3] For testing --- src/model.py | 6 ++++++ tools/gen_pb_exec_env.sh | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/model.py b/src/model.py index d8ed413..5a251e5 100755 --- a/src/model.py +++ b/src/model.py @@ -207,6 +207,12 @@ def initialize(self, args): "Torch parallelism settings " + for_model + ": " + setting_msg ) + # Print out python version + print( + f"Python version is {sys.version_info.major}.{sys.version_info.minor}", + flush=True, + ) + self._infer_mode = torch.inference_mode(mode=True) self._infer_mode.__enter__() diff --git a/tools/gen_pb_exec_env.sh b/tools/gen_pb_exec_env.sh index d569359..d9faf3a 100755 --- a/tools/gen_pb_exec_env.sh +++ b/tools/gen_pb_exec_env.sh @@ -49,4 +49,3 @@ conda pack -o pb_exec_env_model.py.tar.gz # deactivate conda conda deactivate -conda deactivate From 118dd08a98820616397b36d7617f7e2d90256d8d Mon Sep 17 00:00:00 2001 From: krishung5 Date: Thu, 14 Nov 2024 16:56:01 -0800 Subject: [PATCH 3/3] Try with python 3.12 --- src/model.py | 6 ------ tools/gen_pb_exec_env.sh | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/model.py b/src/model.py index 5a251e5..d8ed413 100755 --- a/src/model.py +++ b/src/model.py @@ -207,12 +207,6 @@ def initialize(self, args): "Torch parallelism settings " + for_model + ": " + setting_msg ) - # Print out python version - print( - f"Python version is {sys.version_info.major}.{sys.version_info.minor}", - flush=True, - ) - self._infer_mode = torch.inference_mode(mode=True) self._infer_mode.__enter__() diff --git a/tools/gen_pb_exec_env.sh b/tools/gen_pb_exec_env.sh index d9faf3a..d01a0d9 100755 --- a/tools/gen_pb_exec_env.sh +++ b/tools/gen_pb_exec_env.sh @@ -32,7 +32,7 @@ bash Miniconda3-py312_24.9.2-0-Linux-x86_64.sh -p ./miniconda -b eval "$(./miniconda/bin/conda shell.bash hook)" # create conda environment -conda create -n pt python=3.10 -y +conda create -n pt python=3.12 -y conda activate pt conda install -c conda-forge conda-pack -y