k-l-lambda Claude commited on
Commit
b7f5bc6
·
1 Parent(s): 26001bb

Remove git and git-lfs from Docker build

Browse files

HF Space handles LFS file resolution during git clone before Docker build starts.
Remove git-lfs install which was failing.

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +10 -15
Dockerfile CHANGED
@@ -2,29 +2,26 @@ FROM node:20-slim
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # Build timestamp: 2026-01-12T23:40
6
 
7
- RUN apt-get update && apt-get install -y curl git git-lfs && rm -rf /var/lib/apt/lists/*
8
-
9
- # Install yarn
10
- RUN npm install -g yarn tsx esbuild
11
 
12
  WORKDIR /app
13
 
14
- # Initialize git-lfs
15
- RUN git lfs install
16
 
17
  # Copy all package files
18
  RUN mkdir -p app backend
19
  COPY trigo-web/package.json ./package.json
20
  COPY trigo-web/yarn.lock ./yarn.lock
21
  COPY trigo-web/backend/package.json ./backend/package.json
 
22
 
23
- # Install root deps with yarn
24
  RUN yarn install --production --frozen-lockfile || yarn install --production
25
 
26
- # Install backend deps (no yarn.lock, use npm)
27
- COPY trigo-web/backend/package-lock.json ./backend/package-lock.json
28
  RUN cd backend && npm ci --omit=dev || npm install --omit=dev --force
29
 
30
  # Copy backend source
@@ -37,7 +34,7 @@ RUN mkdir -p backend/dist/backend/src && \
37
  --outfile=backend/dist/backend/src/server.js \
38
  --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
39
 
40
- # Copy pre-built frontend dist
41
  COPY trigo-web/app/dist/ ./app/dist/
42
 
43
  # Copy public folder
@@ -54,10 +51,8 @@ COPY trigo-web/inc/ ./inc/
54
  # Copy parser
55
  COPY trigo-web/public/lib/tgnParser.cjs ./public/lib/
56
 
57
- # Check LFS files
58
- RUN echo "=== Checking LFS files ===" && \
59
- ls -la app/dist/assets/*.wasm 2>/dev/null || echo "No WASM files found" && \
60
- file app/dist/assets/*.wasm 2>/dev/null | head -1 || echo "Cannot check file type"
61
 
62
  ENV PORT=7860
63
  ENV HOST=0.0.0.0
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Build timestamp: 2026-01-12T23:50
6
 
7
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
 
 
 
8
 
9
  WORKDIR /app
10
 
11
+ # Install yarn and esbuild
12
+ RUN npm install -g yarn esbuild
13
 
14
  # Copy all package files
15
  RUN mkdir -p app backend
16
  COPY trigo-web/package.json ./package.json
17
  COPY trigo-web/yarn.lock ./yarn.lock
18
  COPY trigo-web/backend/package.json ./backend/package.json
19
+ COPY trigo-web/backend/package-lock.json ./backend/package-lock.json
20
 
21
+ # Install root deps with yarn (production only)
22
  RUN yarn install --production --frozen-lockfile || yarn install --production
23
 
24
+ # Install backend deps
 
25
  RUN cd backend && npm ci --omit=dev || npm install --omit=dev --force
26
 
27
  # Copy backend source
 
34
  --outfile=backend/dist/backend/src/server.js \
35
  --external:express --external:socket.io --external:cors --external:dotenv --external:uuid
36
 
37
+ # Copy pre-built frontend dist (LFS files should be resolved by HF Space git clone)
38
  COPY trigo-web/app/dist/ ./app/dist/
39
 
40
  # Copy public folder
 
51
  # Copy parser
52
  COPY trigo-web/public/lib/tgnParser.cjs ./public/lib/
53
 
54
+ # Verify dist folder
55
+ RUN echo "=== Dist folder contents ===" && ls -la app/dist/
 
 
56
 
57
  ENV PORT=7860
58
  ENV HOST=0.0.0.0