dockerfile: update building wamr dependencies
This commit is contained in:
@ -3,6 +3,7 @@ FROM ubuntu:noble AS wamr-builder
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berline apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
busybox \
|
||||
git \
|
||||
cmake \
|
||||
ca-certificates \
|
||||
@ -23,11 +24,12 @@ RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime \
|
||||
&& git checkout WAMR-2.4.4
|
||||
WORKDIR /wasm-micro-runtime
|
||||
|
||||
# Build WAMR vmcore
|
||||
RUN mkdir build && cd build \
|
||||
# Build WAMR iwasm (standalone interpreter)
|
||||
RUN cd product-mini/platforms/linux \
|
||||
&& mkdir build_iwasm && cd build_iwasm \
|
||||
&& cmake \
|
||||
-DWAMR_BUILD_AOT=1 \
|
||||
-DWAMR_BUILD_WAMR_COMPILER=1 \
|
||||
-DWAMR_BUILD_AOT=0 \
|
||||
-DWAMR_BUILD_WAMR_COMPILER=0 \
|
||||
-DWAMR_BUILD_INTERP=1 \
|
||||
-DWAMR_BUILD_FAST_INTERP=0 \
|
||||
-DWAMR_BUILD_JIT=0 \
|
||||
@ -37,17 +39,50 @@ RUN mkdir build && cd build \
|
||||
.. \
|
||||
&& make -j$(nproc)
|
||||
|
||||
# Build WAMR wamrc
|
||||
RUN cd wamr-compiler \
|
||||
&& ./build_llvm.sh \
|
||||
&& mkdir build && cd build \
|
||||
&& cmake .. \
|
||||
# Build WAMR libiwasm (interpreter runtime)
|
||||
RUN mkdir build_libiwasm && cd build_libiwasm \
|
||||
&& cmake \
|
||||
-DWAMR_BUILD_AOT=1 \
|
||||
-DWAMR_BUILD_WAMR_COMPILER=0 \
|
||||
-DWAMR_BUILD_INTERP=1 \
|
||||
-DWAMR_BUILD_FAST_INTERP=0 \
|
||||
-DWAMR_BUILD_JIT=0 \
|
||||
-DWAMR_BUILD_FAST_JIT=0 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
.. \
|
||||
&& make -j$(nproc)
|
||||
|
||||
# Build WAMR iwasm
|
||||
RUN cd product-mini/platforms/linux \
|
||||
&& mkdir build && cd build \
|
||||
&& cmake .. \
|
||||
# Build WAMR wamrc (standalone compiler)
|
||||
RUN cd wamr-compiler \
|
||||
&& ./build_llvm.sh \
|
||||
&& mkdir build_wamrc && cd build_wamrc \
|
||||
&& cmake \
|
||||
-DWAMR_BUILD_AOT=0 \
|
||||
-DWAMR_BUILD_WAMR_COMPILER=1 \
|
||||
-DWAMR_BUILD_INTERP=0 \
|
||||
-DWAMR_BUILD_FAST_INTERP=0 \
|
||||
-DWAMR_BUILD_JIT=0 \
|
||||
-DWAMR_BUILD_FAST_JIT=0 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
.. \
|
||||
&& make -j$(nproc)
|
||||
|
||||
# Build WAMR libvmlib (compiler runtime)
|
||||
RUN cd wamr-compiler \
|
||||
&& ./build_llvm.sh \
|
||||
&& mkdir build_libvmlib && cd build_libvmlib \
|
||||
&& cmake \
|
||||
-DWAMR_BUILD_AOT=1 \
|
||||
-DWAMR_BUILD_WAMR_COMPILER=0 \
|
||||
-DWAMR_BUILD_INTERP=1 \
|
||||
-DWAMR_BUILD_FAST_INTERP=0 \
|
||||
-DWAMR_BUILD_JIT=0 \
|
||||
-DWAMR_BUILD_FAST_JIT=0 \
|
||||
-DWAMR_BUILD_LIBC_BUILTIN=1 \
|
||||
-DWAMR_BUILD_LIBC_WASI=1 \
|
||||
.. \
|
||||
&& make -j$(nproc)
|
||||
|
||||
# =============================================================================
|
||||
@ -62,16 +97,14 @@ RUN apt-get update \
|
||||
neovim \
|
||||
ranger \
|
||||
wabt \
|
||||
busybox \
|
||||
&& apt-get clean
|
||||
|
||||
COPY --from=wamr-builder /wasm-micro-runtime /opt/wamr
|
||||
# COPY --from=wamr-builder /wasm-micro-runtime/build /opt/wamr-vmcore
|
||||
# COPY --from=wamr-builder /wasm-micro-runtime/wamr-compiler/build /opt/wamr-wamrc
|
||||
# COPY --from=wamr-builder /wasm-micro-runtime/product-mini/platforms/linux/build /opt/wamr-iwasm
|
||||
|
||||
RUN ln -sf /opt/wamr/build /opt/wamr-vmcore \
|
||||
&& ln -sf /opt/wamr/wamr-compiler/build /opt/wamr-wamrc \
|
||||
&& ln -sf /opt/wamr/product-mini/platforms/linux/build /opt/wamr-iwasm
|
||||
RUN ln -sf /opt/wamr/product-mini/platforms/linux/build_iwasm /opt/wamr-iwasm \
|
||||
&& ln -sf /opt/wamr/build_libiwasm /opt/wamr-libiwasm \
|
||||
&& ln -sf /opt/wamr/wamr-compiler/build_wamrc /opt/wamr-wamrc \
|
||||
&& ln -sf /opt/wamr/wamr-compiler/build_libvmlib /opt/wamr-libvmlib
|
||||
|
||||
COPY ./examples /home/ubuntu/examples
|
||||
WORKDIR /home/ubuntu/examples
|
||||
|
||||
Reference in New Issue
Block a user