Spaces:
Sleeping
Sleeping
Commit History
-
fix: skip coi-serviceworker in iframe to allow HF Space embedding
The COOP header (Cross-Origin-Opener-Policy: same-origin) was blocking iframe embedding on huggingface.co/spaces. Now the service worker only registers when not in an iframe. Trade-off: - Direct access: Full SharedArrayBuffer support (faster AI) - Iframe embedding: No SharedArrayBuffer (AI uses single-thread, but works) Co-Authored-By: Claude <noreply@anthropic.com>d182f15
-
fix(docker): improve startup script with better error handling and logging
Added verbose logging to diagnose runtime errors: - Log container startup time and environment - Use curl -f flag to fail on HTTP errors - Report downloaded file sizes - List ONNX directory contents before starting server Co-Authored-By: Claude <noreply@anthropic.com>fa72e90
-
Trigger rebuild with updated timestamp
HF requires ONNX files in LFS, curl download at startup handles this. Co-Authored-By: Claude <noreply@anthropic.com>958f00f -
fix(docker): download LFS files at startup instead of COPY
Docker COPY doesn't resolve Git LFS pointers. Instead, use a startup script to download ONNX files from HuggingFace at container start. This ensures ONNX model files are properly available for VS AI mode. Co-Authored-By: Claude <noreply@anthropic.com>c4a0a71 -
fix(docker): use git clone to properly resolve LFS files
Docker COPY doesn't resolve Git LFS pointers during build. Instead, clone the repo at build time (with git lfs pull) to get actual files. This ensures ONNX model files are properly available in the container. Co-Authored-By: Claude <noreply@anthropic.com>8c8e029 -
fix(docker): install git-lfs to fetch large model files
Added 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>11efae4 -
fix(docker): use regex instead of require('path') for extension check
Use regex /\.[a-zA-Z0-9]+$/ to detect file extensions in SPA catch-all route, avoiding ESM/CommonJS compatibility issues with require(). Co-Authored-By: Claude <noreply@anthropic.com>b92158e -
fix(docker): add path.extname check to SPA catch-all route
The inline docker-entry.ts now skips files with extensions (.onnx, .wasm), allowing static middleware to serve them correctly. This fixes ONNX model loading on HF Space which was incorrectly returning index.html. Co-Authored-By: Claude <noreply@anthropic.com>55a6cd7
-
fix: remove .env.local from Dockerfile (local dev file only)
2aea863
-
Fix: Docker-specific entry point with correct paths
172c3de -
Test: run TypeScript directly with tsx
006b994 -
Fix: add node_modules symlinks for module resolution
255c58f -
Test: full esbuild bundle with external deps
654dfbb -
Test: Express + Socket.io server
aba34fa -
Test: simple Express ESM server to verify module resolution
cb658ec -
Bundle all dependencies (remove --external flags)
48fe432 -
Debug: restore Node server with startup wrapper
1f609d0 -
Test: minimal static file server to debug container startup
e5bc874 -
Debug: add syntax check, install onnxruntime-web for WASM
7e9c04f -
Debug: add file verification, remove unneeded public folder copy
e068877 -
Fix .dockerignore: keep WASM files needed for onnxruntime
f4876c1 -
Fix Docker build: copy inc/ before esbuild, allow .env.local
a6949ee -
Use .dockerignore to exclude LFS files (WASM, ONNX)
- Add LFS file patterns to .dockerignore - Simplify Dockerfile to copy entire directories - LFS files will be excluded automatically Co-Authored-By: Claude <noreply@anthropic.com>1383f8e -
Force rebuild with new timestamp
Co-Authored-By: Claude <noreply@anthropic.com>6961147 -
Skip LFS files (ONNX, WASM) - copy only essential frontend files
LFS files don't work properly in Docker builds. Skip them for now - app will work for basic gameplay without AI. Co-Authored-By: Claude <noreply@anthropic.com>fc1befc -
Add error handling to diagnose cp failure
Show directory contents if cp fails. Co-Authored-By: Claude <noreply@anthropic.com>cfb16ef -
Create app directory before copying dist
mkdir -p app before cp -r. Co-Authored-By: Claude <noreply@anthropic.com>4ee4b23 -
Add debug output for cloned repo contents
Check what's in the cloned repo after git lfs pull. Co-Authored-By: Claude <noreply@anthropic.com>2548820 -
Clone repo with git-lfs inside Docker to get LFS files
Docker COPY doesn't resolve LFS files properly. Clone the repo and use git lfs pull to get actual files. Co-Authored-By: Claude <noreply@anthropic.com>617ede1 -
Remove all echo statements from Dockerfile
Minimal Dockerfile without debug output. Co-Authored-By: Claude <noreply@anthropic.com>b218f18 -
Simplify Dockerfile - copy directories without wildcards
Docker COPY with wildcards may have issues. Copy entire directories at once instead. Co-Authored-By: Claude <noreply@anthropic.com>8c053fb -
Split frontend copy to identify LFS file issue
Copy non-LFS files first, then LFS files (WASM, ONNX) separately to identify exactly which copy fails. Co-Authored-By: Claude <noreply@anthropic.com>196976e -
Install backend deps at root level to avoid nested npm issue
Copy backend package.json to root and install there. This avoids the nested directory npm install which was failing. Co-Authored-By: Claude <noreply@anthropic.com>ba018b4 -
Try npm install with --ignore-scripts for backend
Postinstall scripts might be failing, try skipping them. Co-Authored-By: Claude <noreply@anthropic.com>aa55d85 -
Add more debugging for backend npm install
- Explicitly create backend directory - Show full npm install output - Add explicit error message on failure Co-Authored-By: Claude <noreply@anthropic.com>426c756 -
Minimal diagnostic Dockerfile with step-by-step echo
Each step has echo output to identify exactly where build fails. Co-Authored-By: Claude <noreply@anthropic.com>8503c2c -
Remove git and git-lfs from Docker build
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>b7f5bc6 -
Use yarn for root install, npm for backend
- Use yarn for root level (has yarn.lock) - Use npm ci for backend (no yarn.lock) - Skip devDependencies for backend (not needed for production) Co-Authored-By: Claude <noreply@anthropic.com>26001bb -
Use npm ci with fallback to npm install --force
Try npm ci first for faster/reliable installs, fall back to npm install --force if that fails. Co-Authored-By: Claude <noreply@anthropic.com>7bb4f7a -
Skip frontend build, use pre-built dist folder
- Remove app npm install and vite build (was failing) - Copy pre-built dist folder directly - Only build backend with esbuild - Add check for LFS file integrity Co-Authored-By: Claude <noreply@anthropic.com>f35f8c5 -
Use full node:20 image and add verbose npm install
- Switch from node:20-slim to node:20 for better dependency support - Add verbose logging to app npm install to diagnose failures Co-Authored-By: Claude <noreply@anthropic.com>d1748ef -
Fix Dockerfile to copy correct config files
- Remove tsconfig.json from app/ (doesn't exist) - Copy root tsconfig.json instead Co-Authored-By: Claude <noreply@anthropic.com>2488b95 -
Add verbose step-by-step debug output to Dockerfile
Each build step now prints output to help identify where the build fails. Co-Authored-By: Claude <noreply@anthropic.com>574ab36 -
Revert to building frontend from source with verbose output
Add echo statements to see where build fails on HF Space. Co-Authored-By: Claude <noreply@anthropic.com>5b189e3 -
Use git clone with LFS pull to properly resolve LFS files
Docker COPY doesn't resolve LFS files, only copies pointer files. This approach clones the repo inside Docker and runs git lfs pull to get the actual ONNX models and WASM files. Co-Authored-By: Claude <noreply@anthropic.com>850daa9 -
Use pre-built dist folder instead of building in Docker
Skip vite build step entirely - use pre-built frontend dist folder. HF Space's git clone resolves LFS files properly, so the ONNX models and WASM files should be copied correctly. This avoids the vite build failures we've been seeing. Co-Authored-By: Claude <noreply@anthropic.com>11f07f6 -
Trigger rebuild
Co-Authored-By: Claude <noreply@anthropic.com>2cbd678 -
Fix: increase memory for vite build
Co-Authored-By: Claude <noreply@anthropic.com>d371cc1 -
Revert to building in Docker instead of using pre-built files
This avoids LFS issues by only copying source files. ONNX files will need to be handled separately. Co-Authored-By: Claude <noreply@anthropic.com>90ad400 -
Debug: add verbose directory listing during clone
Co-Authored-By: Claude <noreply@anthropic.com>4f0cc53