Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -14,23 +14,23 @@ RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh \
|
|
| 14 |
|
| 15 |
RUN pip install --upgrade "huggingface_hub[cli]"
|
| 16 |
|
| 17 |
-
# Clone the
|
| 18 |
WORKDIR /tmp/app
|
| 19 |
-
RUN git clone https://github.com/corranmac/
|
| 20 |
|
| 21 |
# Build the app
|
| 22 |
-
WORKDIR /tmp/app/
|
| 23 |
RUN npm ci && npm rebuild && npm run build
|
| 24 |
|
| 25 |
ARG STATIC_SPACE
|
| 26 |
|
| 27 |
# 1. get README.md from the site space
|
| 28 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 29 |
-
huggingface-cli download --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space --local-dir=/tmp/app/
|
| 30 |
-
&& rm -rf /tmp/app/
|
| 31 |
|
| 32 |
# 2. upload the new build to the site space, including README.md
|
| 33 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 34 |
-
huggingface-cli upload --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space $STATIC_SPACE /tmp/app/
|
| 35 |
|
| 36 |
RUN exit 1
|
|
|
|
| 14 |
|
| 15 |
RUN pip install --upgrade "huggingface_hub[cli]"
|
| 16 |
|
| 17 |
+
# Clone the SesameFlow repo into /tmp/app
|
| 18 |
WORKDIR /tmp/app
|
| 19 |
+
RUN git clone https://github.com/corranmac/SesameFlow.git
|
| 20 |
|
| 21 |
# Build the app
|
| 22 |
+
WORKDIR /tmp/app/SesameFlow
|
| 23 |
RUN npm ci && npm rebuild && npm run build
|
| 24 |
|
| 25 |
ARG STATIC_SPACE
|
| 26 |
|
| 27 |
# 1. get README.md from the site space
|
| 28 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 29 |
+
huggingface-cli download --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space --local-dir=/tmp/app/SesameFlow/dist $STATIC_SPACE README.md \
|
| 30 |
+
&& rm -rf /tmp/app/SesameFlow/dist/.cache
|
| 31 |
|
| 32 |
# 2. upload the new build to the site space, including README.md
|
| 33 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 34 |
+
huggingface-cli upload --token=$(cat /run/secrets/HF_TOKEN) --repo-type=space $STATIC_SPACE /tmp/app/SesameFlow/dist . --delete "*"
|
| 35 |
|
| 36 |
RUN exit 1
|