stillerman commited on
Commit
86fd4cd
·
1 Parent(s): 957e7cc

use token during docker build

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -44,7 +44,12 @@ RUN echo "VITE_ENV=production" >> .env
44
  RUN yarn install
45
  RUN yarn build
46
 
47
- RUN curl -L https://huggingface.co/HuggingFaceTB/simplewiki-pruned-text-350k/resolve/main/wikihop.db -o wikihop.db
 
 
 
 
 
48
 
49
  ENV WIKISPEEDIA_DB_PATH=/home/user/app/wikihop.db
50
 
 
44
  RUN yarn install
45
  RUN yarn build
46
 
47
+ RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
48
+ echo "HF_TOKEN=$(cat /run/secrets/HF_TOKEN)" >> .env
49
+
50
+ RUN curl https://huggingface.co/api/whoami-v2 -H "Authorization: Bearer ${HF_TOKEN}"
51
+
52
+ RUN curl -L https://huggingface.co/HuggingFaceTB/simplewiki-pruned-text-350k/resolve/main/wikihop.db -H "Authorization: Bearer ${HF_TOKEN}" -o wikihop.db
53
 
54
  ENV WIKISPEEDIA_DB_PATH=/home/user/app/wikihop.db
55