Spaces:
Running
Running
coyotte508
commited on
Commit
·
6c006a2
1
Parent(s):
f575c9e
update dockerfile with hfjs!
Browse files- Dockerfile +3 -0
- build.sh +2 -2
Dockerfile
CHANGED
|
@@ -15,6 +15,9 @@ RUN corepack enable \
|
|
| 15 |
# Install huggingface_hub and huggingface_hub[cli]
|
| 16 |
RUN pip install -U "huggingface_hub"
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# Define a working directory
|
| 19 |
WORKDIR /app
|
| 20 |
|
|
|
|
| 15 |
# Install huggingface_hub and huggingface_hub[cli]
|
| 16 |
RUN pip install -U "huggingface_hub"
|
| 17 |
|
| 18 |
+
# Install hfjs cli
|
| 19 |
+
RUN npm install -g @huggingface/hub@2.0.1-cli.2
|
| 20 |
+
|
| 21 |
# Define a working directory
|
| 22 |
WORKDIR /app
|
| 23 |
|
build.sh
CHANGED
|
@@ -36,7 +36,7 @@ eval $BUILD_COMMAND
|
|
| 36 |
|
| 37 |
echo "Build completed successfully, uploading the build output..."
|
| 38 |
|
| 39 |
-
# Upload the build output to the Hugging Face space
|
| 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 from-empty instead of --from-revision
|
| 40 |
+
hfjs upload $HF_SPACE_NAME $OUTPUT_PATH $OUTPUT_PATH --from-revision main --repo-type space --revision refs/convert/build --token $HF_TOKEN
|
| 41 |
|
| 42 |
echo "Build and upload completed successfully."
|