Spaces:
Sleeping
Sleeping
Commit
·
11efae4
1
Parent(s):
b92158e
fix(docker): install git-lfs to fetch large model files
Browse filesAdded git and git-lfs installation to Docker build to properly resolve
LFS pointers for ONNX model files. The COPY command may only get LFS
pointers, so we need to explicitly pull the actual files.
Co-Authored-By: Claude <noreply@anthropic.com>
- Dockerfile +10 -1
Dockerfile
CHANGED
|
@@ -2,10 +2,13 @@ FROM node:20-slim
|
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
-
# Build timestamp: 2026-01-
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
# Copy backend package.json and install ALL deps (including dev for tsx)
|
| 10 |
COPY trigo-web/backend/package.json ./package.json
|
| 11 |
RUN npm install
|
|
@@ -19,6 +22,12 @@ COPY trigo-web/inc/ ./inc/
|
|
| 19 |
# Copy frontend dist
|
| 20 |
COPY trigo-web/app/dist/ ./app/dist/
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
# Copy env files (only .env, .env.local is for local development only)
|
| 23 |
COPY trigo-web/backend/.env ./backend/.env
|
| 24 |
|
|
|
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
+
# Build timestamp: 2026-01-17T16:00
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
+
# Install git and git-lfs for handling large files
|
| 10 |
+
RUN apt-get update && apt-get install -y git git-lfs && git lfs install && rm -rf /var/lib/apt/lists/*
|
| 11 |
+
|
| 12 |
# Copy backend package.json and install ALL deps (including dev for tsx)
|
| 13 |
COPY trigo-web/backend/package.json ./package.json
|
| 14 |
RUN npm install
|
|
|
|
| 22 |
# Copy frontend dist
|
| 23 |
COPY trigo-web/app/dist/ ./app/dist/
|
| 24 |
|
| 25 |
+
# Fetch LFS files (in case COPY only got pointers)
|
| 26 |
+
COPY .git/ ./.git/
|
| 27 |
+
COPY .gitattributes ./
|
| 28 |
+
RUN git lfs pull || true
|
| 29 |
+
RUN rm -rf .git .gitattributes
|
| 30 |
+
|
| 31 |
# Copy env files (only .env, .env.local is for local development only)
|
| 32 |
COPY trigo-web/backend/.env ./backend/.env
|
| 33 |
|