Unverified Commit 8c884345 authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

fix: make HF cache mount point dynamic based on target (#3270)


Signed-off-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
parent 74a56676
......@@ -269,7 +269,13 @@ get_options() {
if [ -n "$HF_CACHE" ]; then
mkdir -p "$HF_CACHE"
VOLUME_MOUNTS+=" -v $HF_CACHE:/root/.cache/huggingface"
# Use /home/ubuntu for local-dev target, /root for dev target.
if [ "$TARGET" = "local-dev" ] || [[ "$IMAGE" == *"local-dev"* ]]; then
HF_CACHE_TARGET="/home/ubuntu/.cache/huggingface"
else
HF_CACHE_TARGET="/root/.cache/huggingface"
fi
VOLUME_MOUNTS+=" -v $HF_CACHE:$HF_CACHE_TARGET"
fi
if [ -z "${PRIVILEGED}" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment