From c6414d4fb01554042cf680230d5ee1646a5b3f0d Mon Sep 17 00:00:00 2001 From: Alex Morehead Date: Tue, 24 Sep 2024 16:35:53 -0500 Subject: [PATCH] Store model weights elsewhere --- scripts/build_inference_script.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/build_inference_script.py b/scripts/build_inference_script.py index f9aba20..866462b 100644 --- a/scripts/build_inference_script.py +++ b/scripts/build_inference_script.py @@ -362,6 +362,17 @@ def build_inference_script( # `PoseBench` Conda environment was created using `--prefix PoseBench/` # to reduce storage usage in one's HPC home directory f.write("\nconda activate PoseBench/\n\n") + + # NOTE: Model weights may take up too much space in one's HPC + # home directory, so we recommend using a command like the following + # to store the model weights in a larger storage location (e.g., `/scratch`): + f.write( + "# Store model weights in a larger storage location\n" + + 'export TORCH_HOME="/cluster/pixstor/chengji-lab/$USER/torch_cache"\n' + + 'export HF_HOME="/cluster/pixstor/chengji-lab/$USER/hf_cache"\n\n' + + 'mkdir -p "$TORCH_HOME"\n' + + 'mkdir -p "$HF_HOME"\n\n' + ) else: f.write( "# shellcheck source=/dev/null\n"