Skip to content

Commit

Permalink
Store model weights elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Sep 24, 2024
1 parent 5587d36 commit c6414d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/build_inference_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c6414d4

Please sign in to comment.