Musings from the mountains himwant.org

Add Depth Anything v3 Burn WASM

+38 -2
+38 -2
.tangled/workflows/deploy.yaml
··· 7 7 nixpkgs: 8 8 - nodejs 9 9 - bash 10 - 10 + - git 11 + - cacert 12 + - cargo 13 + - rustc 14 + - wasm-pack 11 15 steps: 12 16 - name: install dependencies 13 17 command: npm install 14 18 19 + - name: build external wasm models 20 + environment: 21 + MODEL_REPOS: >- 22 + https://tangled.org/akshitgaur2005.tngl.sh/depth_anything_v3_burn|depth 23 + command: | 24 + mkdir -p public/wasm 25 + mkdir -p temp_build 26 + cd temp_build 27 + 28 + for entry in $MODEL_REPOS; do 29 + url="${entry%%|*}" 30 + name="${entry##*|}" 31 + 32 + echo "--- Processing $name from $url ---" 33 + 34 + git clone "$url" "$name" 35 + 36 + cd "$name" 37 + echo "Checking out web branch" 38 + git checkout web 39 + 40 + echo "Building WASM" 41 + wasm-pack build --target web --out-dir ../../public/wasm/$name --no-typescript --release 42 + 43 + rm -f ../../public/wasm/$name/.gitignore 44 + 45 + cd .. 46 + done 47 + 48 + cd .. 49 + rm -rf temp_build 50 + 15 51 - name: build site 16 52 # Use 'npm run build' which runs 'astro build' 17 53 command: npm run build 18 54 19 55 - name: deploy 20 56 command: | 21 - npx --yes wrangler pages deploy dist --project-name himwant --branch main 57 + npx --yes wrangler pages deploy dist --project-name himwant --branch main