severo HF staff commited on
Commit
b227a6a
1 Parent(s): d6458f9

add missing README file

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -20,14 +20,14 @@ WORKDIR /tmp/app
20
  COPY svelte-demo/ ./
21
  RUN npm ci && npm rebuild && npm run build
22
 
23
- # The static space name must be passed as an environment variable
24
  # https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime
25
  ARG STATIC_SPACE
26
  # The Hugging Face token must be passed as a secret (https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime)
27
- # 1. get README.md from the static space
28
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
29
- huggingface-cli download --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space --local-dir=. $STATIC_SPACE README.md && rm -rf ./.cache
30
- # 2. upload the new build to the static space, including README.md
31
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
32
  huggingface-cli upload --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space $STATIC_SPACE /tmp/app/dist . --delete "*"
33
 
 
20
  COPY svelte-demo/ ./
21
  RUN npm ci && npm rebuild && npm run build
22
 
23
+ # The site space name must be passed as an environment variable
24
  # https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime
25
  ARG STATIC_SPACE
26
  # The Hugging Face token must be passed as a secret (https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime)
27
+ # 1. get README.md from the site space
28
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
29
+ huggingface-cli download --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space --local-dir=/tmp/app/dist $STATIC_SPACE README.md && rm -rf /tmp/app/dist/.cache
30
+ # 2. upload the new build to the site space, including README.md
31
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
32
  huggingface-cli upload --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space $STATIC_SPACE /tmp/app/dist . --delete "*"
33