Musings from the mountains himwant.org

Add Depth Anything v3 Burn WASM

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