Spaces:
Runtime error
Runtime error
Commit
·
86fd4cd
1
Parent(s):
957e7cc
use token during docker build
Browse files- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|