Spaces:
Runtime error
Runtime error
Archie Wood
commited on
Commit
•
4defe6f
1
Parent(s):
914bd11
maybe the build file is at root?
Browse files- Dockerfile +2 -2
Dockerfile
CHANGED
@@ -27,10 +27,10 @@ ARG STATIC_SPACE
|
|
27 |
# The Hugging Face token must be passed as a secret (https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime)
|
28 |
# 1. get README.md from the site space
|
29 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
30 |
-
huggingface-cli download --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space --local-dir=/
|
31 |
# 2. upload the new build to the site space, including README.md
|
32 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
33 |
-
huggingface-cli upload --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space $STATIC_SPACE /
|
34 |
|
35 |
# Halt execution because the code space is not meant to run.
|
36 |
CMD ["true"]
|
|
|
27 |
# The Hugging Face token must be passed as a secret (https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime)
|
28 |
# 1. get README.md from the site space
|
29 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
30 |
+
huggingface-cli download --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space --local-dir=/build $STATIC_SPACE README.md && rm -rf /build/.cache
|
31 |
# 2. upload the new build to the site space, including README.md
|
32 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
33 |
+
huggingface-cli upload --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space $STATIC_SPACE /build . --delete "*"
|
34 |
|
35 |
# Halt execution because the code space is not meant to run.
|
36 |
CMD ["true"]
|