Dockerfile.cpu 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. FROM ubuntu:20.04 AS base
  4. ENV DEBIAN_FRONTEND=noninteractive
  5. # hadolint ignore=DL3008,DL3009
  6. RUN apt-get update \
  7. && apt-get install -y --no-install-recommends\
  8. ca-certificates cmake build-essential git wget
  9. WORKDIR /usr/local/share/ca-certificates/cacert.org
  10. RUN wget -qP /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt \
  11. && update-ca-certificates
  12. WORKDIR /home/wamr
  13. COPY . .
  14. RUN git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt
  15. WORKDIR /home/wamr/product-mini/platforms/linux
  16. RUN rm -rf build \
  17. && cmake -S . -B build -DWAMR_BUILD_WASI_NN=1 \
  18. && cmake --build build -j "$(grep -c ^processor /proc/cpuinfo)"
  19. FROM ubuntu:22.04
  20. COPY --from=base /home/wamr/product-mini/platforms/linux/build/iwasm /usr/bin/iwasm
  21. COPY --from=base /home/wamr/product-mini/platforms/linux/build/libiwasm.so /lib/libiwasm.so
  22. COPY --from=base /home/wamr/product-mini/platforms/linux/build/libwasi-nn-*.so /lib/
  23. ENTRYPOINT [ "iwasm" ]