Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions wasicontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ LABEL org.opencontainers.image.documentation="https://github.com/python/cpython-

ARG TARGETARCH

# WASI SDK versions are controlled in install-wasi.sh.
ENV WASI_SDK_ROOT=/opt

ENV WASMTIME_VERSION=38.0.2
ENV WASMTIME_HOME=/opt/wasmtime

RUN mkdir -p /opt/cpython-devcontainer/bin
COPY --chmod=755 install-wasi.sh /opt/cpython-devcontainer/bin/

Expand Down
14 changes: 10 additions & 4 deletions wasicontainer/install-wasi.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#! /bin/bash -ex

WASI_SDK_VERSIONS=(
# 16 for 3.11 & 3.12 is special-cased below.
24 # 3.13 (w/ special symlinking below), 3.14
29 # 3.15
)
WASMTIME_VERSION="38.0.4"

WASI_SDK_ROOT=/opt

mkdir --parents ${WASI_SDK_ROOT}

# For 3.11, 3.12.
Expand All @@ -15,10 +24,6 @@ case "${TARGETARCH}" in
*) echo "Unsupported TARGETARCH: ${TARGETARCH}" && exit 1 ;;
esac && \

WASI_SDK_VERSIONS=(
24 # 3.13, 3.14
29 # 3.15
)
for VERSION in "${WASI_SDK_VERSIONS[@]}"; do
# The URL format only works for WASI SDK >= 23.
URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${VERSION}/wasi-sdk-${VERSION}.0-${WASI_ARCH}-linux.tar.gz
Expand All @@ -28,6 +33,7 @@ done
# For Python 3.13 as Tools/wasm/wasi.py expects /opt/wasi-sdk by default.
ln -s ${WASI_SDK_ROOT}/wasi-sdk-24.0*/ /opt/wasi-sdk

WASMTIME_HOME="/opt/wasmtime"

mkdir --parents ${WASMTIME_HOME}

Expand Down