Spaces:
Running
Running
coyotte508
commited on
Commit
·
31284e3
1
Parent(s):
6c006a2
Latest version of HF cli
Browse files- Dockerfile +1 -1
- build.sh +4 -2
Dockerfile
CHANGED
@@ -16,7 +16,7 @@ RUN corepack enable \
|
|
16 |
RUN pip install -U "huggingface_hub"
|
17 |
|
18 |
# Install hfjs cli
|
19 |
-
RUN npm install -g @huggingface/[email protected].
|
20 |
|
21 |
# Define a working directory
|
22 |
WORKDIR /app
|
|
|
16 |
RUN pip install -U "huggingface_hub"
|
17 |
|
18 |
# Install hfjs cli
|
19 |
+
RUN npm install -g @huggingface/[email protected].4
|
20 |
|
21 |
# Define a working directory
|
22 |
WORKDIR /app
|
build.sh
CHANGED
@@ -36,7 +36,9 @@ eval $BUILD_COMMAND
|
|
36 |
|
37 |
echo "Build completed successfully, uploading the build output..."
|
38 |
|
39 |
-
# Upload the build output to the Hugging Face space. Later use
|
40 |
-
|
|
|
|
|
41 |
|
42 |
echo "Build and upload completed successfully."
|
|
|
36 |
|
37 |
echo "Build completed successfully, uploading the build output..."
|
38 |
|
39 |
+
# Upload the build output to the Hugging Face space. Later use --empty instead of --revision
|
40 |
+
# Those commands use the HF_TOKEN in the environment
|
41 |
+
hfjs create-branch $HF_SPACE_NAME refs/convert/build --repo-type space --revision main
|
42 |
+
hfjs upload $HF_SPACE_NAME $OUTPUT_PATH $OUTPUT_PATH --repo-type space --revision refs/convert/build
|
43 |
|
44 |
echo "Build and upload completed successfully."
|