kaveh commited on
Commit
463893c
·
1 Parent(s): bb3c1bf

added access to repo for ckp

Browse files
Files changed (1) hide show
  1. S2FApp/Dockerfile +4 -2
S2FApp/Dockerfile CHANGED
@@ -29,10 +29,12 @@ COPY --chown=user:user config/ config/
29
  RUN mkdir -p ckp sample && chown -R user:user ckp sample
30
 
31
  # Download checkpoints from Hugging Face if ckp is empty (for Space deployment)
32
- # Set HF_MODEL_REPO env to your model repo, e.g. kaveh/Shape2Force
 
33
  ARG HF_MODEL_REPO=kaveh/Shape2Force
34
  ENV HF_MODEL_REPO=${HF_MODEL_REPO}
35
- RUN python download_ckp.py
 
36
 
37
  # Ensure ckp contents are readable by user
38
  RUN chown -R user:user ckp
 
29
  RUN mkdir -p ckp sample && chown -R user:user ckp sample
30
 
31
  # Download checkpoints from Hugging Face if ckp is empty (for Space deployment)
32
+ # Requires HF_TOKEN secret in Space Settings (https://huggingface.co/settings/tokens)
33
+ # for private model repos. Set HF_MODEL_REPO to your model repo, e.g. kaveh/Shape2Force
34
  ARG HF_MODEL_REPO=kaveh/Shape2Force
35
  ENV HF_MODEL_REPO=${HF_MODEL_REPO}
36
+ RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
37
+ HF_TOKEN=$(cat /run/secrets/HF_TOKEN) python download_ckp.py
38
 
39
  # Ensure ckp contents are readable by user
40
  RUN chown -R user:user ckp