From 2fdd1ee736844876fbf4ca8dd8c7e6c93d8aa84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jere=20Lepp=C3=A4nen?= Date: Fri, 12 Jan 2024 18:11:58 +0200 Subject: [PATCH] ubuntu_22.04: install ML dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For machine learning support, install ONNX Runtime library (https://github.com/microsoft/onnxruntime), and onnx and numpy python packages. Signed-off-by: Lifang Zhang Signed-off-by: Jere Leppänen --- ubuntu_22.04-arm64-native/Dockerfile | 14 ++++++++++++-- ubuntu_22.04-x86_64/Dockerfile | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ubuntu_22.04-arm64-native/Dockerfile b/ubuntu_22.04-arm64-native/Dockerfile index d0ddbf6..dc64354 100644 --- a/ubuntu_22.04-arm64-native/Dockerfile +++ b/ubuntu_22.04-arm64-native/Dockerfile @@ -3,7 +3,8 @@ FROM ubuntu:22.04 ENV DPDK_VERSION=v22.11.3 \ IPSEC_MB_VERSION=SECLIB-IPSEC-2022.12.13 \ XDP_VERSION=v1.2.3 \ - AARCH64_CRYPTOLIB_TAG=2445f0e + AARCH64_CRYPTOLIB_TAG=2445f0e \ + ONNX_VERSION=1.16.3 RUN apt-get update @@ -47,11 +48,20 @@ RUN apt-get install -yy \ net-tools \ ninja-build \ python3-pip \ - sudo + sudo \ + wget RUN pip3 install \ + numpy \ + onnx \ pyelftools +RUN cd /usr/local && \ + wget -O - \ + https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-aarch64-${ONNX_VERSION}.tgz | \ + tar zx --strip-components=1 --wildcards "*/include" "*/lib" && \ + ldconfig + RUN cd $HOME && \ git clone http://dpdk.org/git/dpdk-stable --branch ${DPDK_VERSION} --depth 1 ./dpdk && \ cd dpdk && \ diff --git a/ubuntu_22.04-x86_64/Dockerfile b/ubuntu_22.04-x86_64/Dockerfile index 6466337..f372412 100644 --- a/ubuntu_22.04-x86_64/Dockerfile +++ b/ubuntu_22.04-x86_64/Dockerfile @@ -1,7 +1,8 @@ FROM ubuntu:22.04 ENV DPDK_VERSION=v22.11.3 \ - XDP_VERSION=v1.2.3 + XDP_VERSION=v1.2.3 \ + ONNX_VERSION=1.16.3 RUN apt-get update @@ -44,11 +45,20 @@ RUN apt-get install -yy \ net-tools \ ninja-build \ python3-pip \ - sudo + sudo \ + wget RUN pip3 install \ + numpy \ + onnx \ pyelftools +RUN cd /usr/local && \ + wget -O - \ + https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-x64-${ONNX_VERSION}.tgz | \ + tar zx --strip-components=1 --wildcards "*/include" "*/lib" && \ + ldconfig + RUN cd $HOME && \ git clone http://dpdk.org/git/dpdk-stable --branch ${DPDK_VERSION} --depth 1 ./dpdk && \ cd dpdk && \