deislabs / containerd-wasm-shims

containerd shims for running WebAssembly workloads in Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

i am getting the error as spin-sdk not found even after following all the steps mentioned

dineshkrishna9999 opened this issue · comments

dinesh@INCHEL-JVQQ2Z2:/mnt/c/Users/c-dinkar/qs-wasm-spin$ docker buildx build --platform=wasi/wasm -t localhost:12345/qs-wasm-spin .
[+] Building 114.8s (8/10)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 330B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/rust:1.59 11.6s
=> [build 1/4] FROM docker.io/library/rust:1.59@sha256:7c0ea3ee40fc4f12a43de1b9967bc5df1337bf469253c322a98952079493448b 0.0s
=> => resolve docker.io/library/rust:1.59@sha256:7c0ea3ee40fc4f12a43de1b9967bc5df1337bf469253c322a98952079493448b 0.0s
=> [internal] load build context 10.9s
=> => transferring context: 56.29kB 10.9s
=> CACHED [build 2/4] WORKDIR /opt/build 0.0s
=> CACHED [build 3/4] COPY . . 0.0s
=> ERROR [build 4/4] RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release 92.2s

[build 4/4] RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release:
#0 0.471 info: downloading component 'rust-std' for 'wasm32-wasi'
#0 2.629 info: installing component 'rust-std' for 'wasm32-wasi'
#0 4.720 Updating crates.io index
#0 83.69 Updating git repository https://github.com/fermyon/spin
#0 88.70 Updating git repository https://github.com/bytecodealliance/wit-bindgen
#0 92.01 error: no matching package named spin-sdk found
#0 92.01 location searched: https://github.com/fermyon/spin?tag=v1.1.0#28655d57
#0 92.01 required by package qs-wasm-spin v0.1.0 (/opt/build)


Dockerfile:4

2 | WORKDIR /opt/build
3 | COPY . .
4 | >>> RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release
5 |
6 | FROM scratch

ERROR: failed to solve: process "/bin/sh -c rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release" did not complete successfully: exit code: 101
dinesh@INCHEL-JVQQ2Z2:/mnt/c/Users/c-dinkar/qs-wasm-spin$ cargo search spin-sdk
spin-sdk = "0.0.0" # Placeholder for Spin SDK
dinesh@INCHEL-JVQQ2Z2:/mnt/c/Users/c-dinkar/qs-wasm-spin$

Thanks for reporting this issue. It looks like cargo can't find the spin-sdk crate. I will try to reproduce it myself locally

commented

I also encountered this problem.

So I try to copy the wasm file inside the container.

commented

And I used mac docker desktop to build,

I tried to use ubuntu docker to build,

but encountered: exporting to image: Error: failed to solve: operating system is not supported

Close as I believe this has been resolved.