Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install python wasmtime on Alpine OS docker container #995

Closed
sharksforarms opened this issue Feb 26, 2020 · 8 comments
Closed

Cannot install python wasmtime on Alpine OS docker container #995

sharksforarms opened this issue Feb 26, 2020 · 8 comments

Comments

@sharksforarms
Copy link

Cannot install python wasmtime on Alpine OS docker container

I think this has something to do with this: docker-library/docs#904

Getting

ERROR: Could not find a version that satisfies the requirement wasmtime (from versions: none)
ERROR: No matching distributions found for wasmtime
@alexcrichton
Copy link
Member

Thanks for the report! At this time we only support glibc binary releases, and to install on Alpine you'll need to compile from source against musl.

@alexcrichton
Copy link
Member

If it helps as well, here's an example of how to build it in alpine:

FROM alpine

# Install build tools
RUN apk add musl-dev g++ curl git

# Install nightly Rust
ENV CARGO_HOME=/cargo RUSTUP_HOME=/rustup PATH=$PATH:/cargo/bin
RUN curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly

# Download and build wasmtime, note that we configure the musl target for
# dynamic linkage here instead of the default static.
RUN git clone https://github.com/bytecodealliance/wasmtime --recursive
WORKDIR /wasmtime
ENV RUSTFLAGS=-Ctarget-feature=-crt-static
RUN cargo fetch
RUN cargo build --release

# Download python and such to build the python extension
RUN apk add python3
RUN pip3 install setuptools wheel setuptools-rust
RUN cd crates/misc/py && python3 setup.py bdist_wheel

@sharksforarms
Copy link
Author

Thanks for the tip!

@bjorn3
Copy link
Contributor

bjorn3 commented Feb 3, 2021

I think this can be closed. If not at least it should be moved to https://github.com/bytecodealliance/wasmtime-py.

@alexcrichton
Copy link
Member

Indeed yes I think the wasmtime-py bits have changed enough that this is no longer relevant as-is.

@willhausman
Copy link

@alexcrichton is this answer still true? I had opened bytecodealliance/wasmtime-dotnet#82 this morning, but further investigation revealed it was not an issue specific to the dotnet build as I can reproduce the same behavior with python.

@bjorn3
Copy link
Contributor

bjorn3 commented Dec 23, 2021

That is probably the same kind of error. However it is something that needs to be separately fixed for both. For example by adding a new build for musl based systems.

@alexcrichton
Copy link
Member

Yes the wasmtime-py extension and the Wasmtime repository do not have precompiled artifacts for musl, only for glibc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants