coyotte508 commited on
Commit
831a83f
·
1 Parent(s): fdbe768

dokcer tweaks

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. build.sh +2 -5
Dockerfile CHANGED
@@ -13,7 +13,7 @@ RUN corepack enable \
13
  && corepack prepare yarn@latest --activate
14
 
15
  # Install huggingface_hub and huggingface_hub[cli]
16
- RUN pip install -U "huggingface_hub[cli]"
17
 
18
  # Define a working directory
19
  WORKDIR /app
 
13
  && corepack prepare yarn@latest --activate
14
 
15
  # Install huggingface_hub and huggingface_hub[cli]
16
+ RUN pip install -U "huggingface_hub"
17
 
18
  # Define a working directory
19
  WORKDIR /app
build.sh CHANGED
@@ -9,11 +9,8 @@ if [ -z "$HF_TOKEN" ] || [ -z "$HF_SPACE_NAME" ] || [ -z "$BUILD_COMMAND" ] || [
9
  exit 1
10
  fi
11
 
12
- # Set the Hugging Face token
13
- export HF_HUB_ACCESS_TOKEN=$HF_TOKEN
14
-
15
  # Download the space
16
- huggingface-cli download spaces/$HF_SPACE_NAME -d space
17
 
18
  # Change directory to the space's directory
19
  cd space
@@ -39,6 +36,6 @@ eval $BUILD_COMMAND
39
  echo "Build completed successfully, uploading the build output..."
40
 
41
  # Upload the build output to the Hugging Face space
42
- huggingface-cli upload spaces/$HF_SPACE_NAME $OUTPUT_PATH / --revision refs/convert/build --token $HF_TOKEN
43
 
44
  echo "Build and upload completed successfully."
 
9
  exit 1
10
  fi
11
 
 
 
 
12
  # Download the space
13
+ huggingface-cli download $HF_SPACE_NAME --repo-type space --local-dir space --token $HF_TOKEN
14
 
15
  # Change directory to the space's directory
16
  cd space
 
36
  echo "Build completed successfully, uploading the build output..."
37
 
38
  # Upload the build output to the Hugging Face space
39
+ huggingface-cli upload $HF_SPACE_NAME $OUTPUT_PATH / --repo-type space --revision refs/convert/build --token $HF_TOKEN
40
 
41
  echo "Build and upload completed successfully."