matdmiller commited on
Commit
99fd5dc
·
verified ·
1 Parent(s): 20367f7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -24,7 +24,12 @@ ENTRYPOINT ["/bin/sh", "-c"]
24
  # COPY aim_repo.tar.gz .
25
  # RUN tar xvzf aim_repo.tar.gz
26
 
27
- RUN python3 -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='LocalResearchGroup/smollm2-135m-20250224_023514', local_dir='.', allow_patterns='.aim/**', token=True)"
 
 
 
 
 
28
 
29
  # have to run `aim init` in the directory that stores aim data for
30
  # otherwise `aim up` will prompt for confirmation to create the directory itself.
 
24
  # COPY aim_repo.tar.gz .
25
  # RUN tar xvzf aim_repo.tar.gz
26
 
27
+ # Expose the secret HF_TOKEN at buildtime and use its value as a Bearer token for a curl request
28
+ # RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
29
+ # curl test -H 'Authorization: Bearer $(cat /run/secrets/HF_TOKEN)'
30
+
31
+ RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
32
+ python3 -c "from huggingface_hub import snapshot_download; import os; os.environ['HF_TOKEN']=$(cat /run/secrets/HF_TOKEN); snapshot_download(repo_id='LocalResearchGroup/smollm2-135m-20250224_023514', local_dir='.', allow_patterns='.aim/**', token=True)"
33
 
34
  # have to run `aim init` in the directory that stores aim data for
35
  # otherwise `aim up` will prompt for confirmation to create the directory itself.