2022-10-12 04:09:29 +00:00
|
|
|
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
cmake build-essential git wget python3.10 python3-pip
|
|
|
|
|
2023-01-25 10:32:40 +00:00
|
|
|
ARG WASI_SDK_VER=16
|
|
|
|
RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER}/wasi-sdk-${WASI_SDK_VER}.0-linux.tar.gz -P /opt \
|
|
|
|
&& tar xf /opt/wasi-sdk-${WASI_SDK_VER}.0-linux.tar.gz -C /opt \
|
|
|
|
&& ln -fs /opt/wasi-sdk-${WASI_SDK_VER}.0 /opt/wasi-sdk \
|
|
|
|
&& rm /opt/wasi-sdk-${WASI_SDK_VER}.0-linux.tar.gz
|
2022-10-12 04:09:29 +00:00
|
|
|
|
|
|
|
WORKDIR /home/wamr
|
|
|
|
|
2023-01-25 10:32:40 +00:00
|
|
|
COPY core/deps/install_tensorflow.sh core/deps/install_tensorflow.sh
|
|
|
|
RUN ./core/deps/install_tensorflow.sh
|
|
|
|
|
|
|
|
COPY core/iwasm/libraries/wasi-nn/test/requirements.txt .
|
|
|
|
RUN pip3 install -r requirements.txt
|
|
|
|
|
2022-10-12 04:09:29 +00:00
|
|
|
COPY core core
|
|
|
|
COPY build-scripts build-scripts
|
|
|
|
COPY product-mini product-mini
|
|
|
|
|
|
|
|
WORKDIR /home/wamr/core/iwasm/libraries/wasi-nn/test/build
|
|
|
|
|
|
|
|
RUN cmake -DWAMR_BUILD_WASI_NN=1 ..
|
|
|
|
RUN make -j $(grep -c ^processor /proc/cpuinfo)
|
|
|
|
|
|
|
|
WORKDIR /home/wamr/core/iwasm/libraries/wasi-nn/test
|
|
|
|
|
|
|
|
RUN ./build.sh
|
|
|
|
|
|
|
|
ENTRYPOINT [ "./build/iwasm", "--dir=.", "test_tensorflow.wasm" ]
|