Closed WinsonSou closed 2 months ago
Workaround is to mount volume into /app/.cache/torch
Thanks for posting the workaround with the issue.
Looks like you are doing nothing wrong here, and the HF_HOME did not get respected.
Nope, i'm just running the default docker image.
docker run -it --gpus all -p $port:$port michaelf34/infinity:latest --model-name-or-path Salesforce/SFR-Embedding-Mistral --port $port --env HF_HOME /root/.cache/huggingface -v /modelcache:/root/.cache/huggingface
Okay, potentially it's because I set a default in the Dockerfile ENV SENTENCE_TRANSFORMERS_HOME=app/.cache
-- I'll add it #195 .
Planning to close this issue then! Thanks for making me aware of this!
This is working now. Enjoy! Please make sure to pin the version, and test expected behaviour as you upgrade.
docker run -it --gpus all -e HF_HOME=/root/.cache/huggingface -v ./modelcache:/root/.cache michaelf34/infinity:0.0.32
Thank you Michael!
System Info
Set HF_HOME to /root/.cache/huggingface
However the model is still getting downloaded to /app/.cache/torch
Information
Tasks
Reproduction
run with docker with HF_HOME environment variable.
Expected behavior
HF_HOME is respected