Spaces:
Sleeping
Sleeping
Commit
·
8060255
1
Parent(s):
e2c9801
Fix: use git clone + lfs pull instead of COPY for LFS files
Browse filesDocker COPY doesn't download LFS files - it only copies the pointer files.
Using git clone followed by git lfs pull ensures the actual file contents
are downloaded.
Co-Authored-By: Claude <noreply@anthropic.com>
- Dockerfile +13 -4
Dockerfile
CHANGED
|
@@ -3,19 +3,28 @@ FROM node:20-slim
|
|
| 3 |
# Set noninteractive installation
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
-
# Build timestamp to force cache invalidation: 2026-01-12T21:
|
| 7 |
|
| 8 |
-
# Install build dependencies
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
curl \
|
| 11 |
git \
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# Create app directory
|
| 15 |
WORKDIR /app
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Install build tools globally (still needed for some scripts)
|
| 21 |
RUN npm install -g tsx jison typescript
|
|
|
|
| 3 |
# Set noninteractive installation
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
+
# Build timestamp to force cache invalidation: 2026-01-12T21:05
|
| 7 |
|
| 8 |
+
# Install build dependencies including git-lfs
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
curl \
|
| 11 |
git \
|
| 12 |
+
git-lfs \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# Initialize git lfs
|
| 16 |
+
RUN git lfs install
|
| 17 |
+
|
| 18 |
# Create app directory
|
| 19 |
WORKDIR /app
|
| 20 |
|
| 21 |
+
# Clone the repo and pull LFS files instead of COPY
|
| 22 |
+
# This ensures LFS files are properly downloaded
|
| 23 |
+
RUN git clone --depth 1 https://huggingface.co/spaces/k-l-lambda/trigo /tmp/repo && \
|
| 24 |
+
cd /tmp/repo && \
|
| 25 |
+
git lfs pull && \
|
| 26 |
+
cp -r trigo-web/* /app/ && \
|
| 27 |
+
rm -rf /tmp/repo
|
| 28 |
|
| 29 |
# Install build tools globally (still needed for some scripts)
|
| 30 |
RUN npm install -g tsx jison typescript
|