coyotte508 commited on
Commit
4c274af
·
1 Parent(s): 55949e2

try using git to clone space

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -0
  2. build.sh +2 -1
Dockerfile CHANGED
@@ -5,8 +5,12 @@ FROM node:22-bullseye-slim
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  python3 \
7
  python3-pip \
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
 
10
  # Install corepack (for pnpm and yarn) and make them available
11
  RUN corepack enable \
12
  && corepack prepare pnpm@latest --activate \
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  python3 \
7
  python3-pip \
8
+ git \
9
+ git-lfs \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ RUN git lfs install
13
+
14
  # Install corepack (for pnpm and yarn) and make them available
15
  RUN corepack enable \
16
  && corepack prepare pnpm@latest --activate \
build.sh CHANGED
@@ -10,7 +10,8 @@ if [ -z "$HF_TOKEN" ] || [ -z "$HF_SPACE_NAME" ] || [ -z "$BUILD_COMMAND" ] || [
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
 
10
  fi
11
 
12
  # Download the space
13
+ git clone --depth 1 https://:[email protected]/spaces/$HF_SPACE_NAME space
14
+ # huggingface-cli download $HF_SPACE_NAME --repo-type space --local-dir space --token $HF_TOKEN
15
 
16
  # Change directory to the space's directory
17
  cd space