From f17b15c923f4f9c8eb053ac55fbbf79684f8af7c Mon Sep 17 00:00:00 2001 From: Aubrey Li Date: Tue, 25 Jun 2024 14:30:12 +0800 Subject: [PATCH] oneapi: add Intel(R) oneAPI initial support Two flavors of oneAPI images are provided: - runtime: includes Intel(R) oneAPI dpcpp compiler runtime. - basekit: includes Intel(R) oneAPI base toolkit. Signed-off-by: Aubrey Li --- AI/oneapi/2024.1/23/basekit/Dockerfile | 36 ++++++++++++++++++ AI/oneapi/2024.1/23/runtime/Dockerfile | 37 +++++++++++++++++++ AI/oneapi/README.md | 39 ++++++++++++++++++++ AI/oneapi/buildspec.yml | 51 ++++++++++++++++++++++++++ AI/oneapi/version.yml | 14 +++++++ 5 files changed, 177 insertions(+) create mode 100644 AI/oneapi/2024.1/23/basekit/Dockerfile create mode 100644 AI/oneapi/2024.1/23/runtime/Dockerfile create mode 100644 AI/oneapi/README.md create mode 100644 AI/oneapi/buildspec.yml create mode 100644 AI/oneapi/version.yml diff --git a/AI/oneapi/2024.1/23/basekit/Dockerfile b/AI/oneapi/2024.1/23/basekit/Dockerfile new file mode 100644 index 0000000..b3349bf --- /dev/null +++ b/AI/oneapi/2024.1/23/basekit/Dockerfile @@ -0,0 +1,36 @@ +# Copyright (c) 2024 Intel Corporation. +# SPDX-License-Identifier: BSD-3-Clause + +FROM registry.openanolis.cn/openanolis/anolisos:23 + +LABEL \ + maintainer="OpenAnolis AI SIG" \ + org.opencontainers.image.title="oneapi basekit" \ + org.opencontainers.image.version="2024.1-basekit" + +RUN dnf install procps-ng -y + +# Setup Anolis EPAO repository and install Intel(R) GPU drivers +RUN dnf install anolis-epao-release -y + +RUN dnf install intel-gmmlib intel-gsc intel-igc-cm intel-igc-core \ + intel-igc-opencl intel-level-zero-gpu intel-ocloc intel-opencl \ + level-zero libmetee -y + +# Setup Intel(R) oneAPI repository and install Intel(R) oneAPI basekit +RUN echo $'\ +[oneAPI]\n\ +name=Intel(R) oneAPI repository\n\ +baseurl=https://yum.repos.intel.com/oneapi\n\ +enabled=1\n\ +gpgcheck=1\n\ +repo_gpgcheck=1\n\ +gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB' \ +> /etc/yum.repos.d/oneAPI.repo + +RUN dnf install intel-basekit-2024.1 -y + +# Setup Intel(R) oneAPI working environment +RUN echo 'source /opt/intel/oneapi/setvars.sh' >> /root/.bashrc + +CMD ["/bin/bash"] diff --git a/AI/oneapi/2024.1/23/runtime/Dockerfile b/AI/oneapi/2024.1/23/runtime/Dockerfile new file mode 100644 index 0000000..cd7dde1 --- /dev/null +++ b/AI/oneapi/2024.1/23/runtime/Dockerfile @@ -0,0 +1,37 @@ +# Copyright (c) 2024 Intel Corporation. +# SPDX-License-Identifier: BSD-3-Clause + +FROM registry.openanolis.cn/openanolis/anolisos:23 + +LABEL \ + maintainer="OpenAnolis AI SIG" \ + org.opencontainers.image.title="oneapi runtime" \ + org.opencontainers.image.version="2024.1-runtime" + +RUN dnf install procps-ng -y + +# Setup Anolis EPAO repository and install Intel(R) GPU drivers +RUN dnf install anolis-epao-release -y + +RUN dnf install intel-gmmlib intel-gsc intel-igc-cm intel-igc-core \ + intel-igc-opencl intel-level-zero-gpu intel-ocloc intel-opencl \ + level-zero libmetee -y + +# Setup Intel(R) oneAPI repository and install Intel(R) oneAPI runtime Libraries +RUN echo $'\ +[oneAPI]\n\ +name=Intel(R) oneAPI repository\n\ +baseurl=https://yum.repos.intel.com/oneapi\n\ +enabled=1\n\ +gpgcheck=1\n\ +repo_gpgcheck=1\n\ +gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB' \ +> /etc/yum.repos.d/oneAPI.repo + +RUN dnf install intel-oneapi-mkl-2024.1 intel-oneapi-compiler-dpcpp-cpp-runtime-2024.1 \ + intel-oneapi-compiler-shared-runtime-2024.1 -y + +# Setup Intel(R) oneAPI working environment +RUN echo 'source /opt/intel/oneapi/setvars.sh' >> /root/.bashrc + +CMD ["/bin/bash"] diff --git a/AI/oneapi/README.md b/AI/oneapi/README.md new file mode 100644 index 0000000..a42692e --- /dev/null +++ b/AI/oneapi/README.md @@ -0,0 +1,39 @@ +# Intel(R) oneAPI + +# Quick reference + +- Maintained by: [OpenAnolis AI SIG](https://openanolis.cn/sig/AI_SIG) +- Where to get help: [OpenAnolis AI SIG](https://openanolis.cn/sig/AI_SIG) + +# Supported tags and respective `Dockerfile` links + +Two flavors of oneAPI images are provides: +* runtime: includes Intel(R) oneAPI runtime libraries. +* basekit: includes Intel(R) oneAPI base toolkit. + +- [`2024.1-runtime`](https://gitee.com/anolis/anolis-container/AI/blob/master/oneapi/2024.1/23/runtime/Dockerfile) +- [`2024.1-basekit`](https://gitee.com/anolis/anolis-container/AI/blob/master/oneapi/2024.1/23/basekit/Dockerfile) + +# Supported architectures + +- x86-64 + +# Build reference + +## Build x86-64 images and push to registry: +```shell +docker buildx build -t "openanolis/oneapi:$VERSION" --platform linux/amd64 . --push +``` + +# Usage + +## Start an Intel(R) oneAPI instance +```shell +docker run --name oneapi-runtime-test openanolis/oneapi:2024.1-runtime +docker run --name oneapi-basekit-test openanolis/oneapi:2024.1-basekit +``` + +# Intel(R) oneAPI +oneAPI is an open, standards-based programming model developed by Intel. +It is designed to simplify programming across different types of computing +architectures, including CPUs, GPUs, FPGAs, and other accelerators. diff --git a/AI/oneapi/buildspec.yml b/AI/oneapi/buildspec.yml new file mode 100644 index 0000000..3cd4e46 --- /dev/null +++ b/AI/oneapi/buildspec.yml @@ -0,0 +1,51 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息 +repository_info: + dockerhub: &DOCKERHUB_PROD + acr: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE container_ci_test + project: &PROJECT default_container_ci_test + test_suite: &TEST_SUITE image-ci-test + # 执行测试 case, 多个用数组表示 + test_conf: &TEST_CONF group=container_default_group + test_case: &TEST_CASE anolis23_baseos_container + cloud_server_tag: &CLOUD_SERVER_TAG [anolis-container-ci-x86] + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildCudaBaseDockerImage: + # 定义是否构建参数 + build: true + test: false + platform: [linux/amd64] + docker_file: + path: AI/oneapi/2024.1/23/runtime/Dockerfile + scene: + args: [] + tags: [2024.1-23-runtime] + registry: [*ACR_PROD] + # 测试配置 + test_config: [*WORKSPACE, *PROJECT, *TEST_SUITE, *TEST_CONF, '', *CLOUD_SERVER_TAG[0], ''] + # 分组名称,支持自定义 + BuildCudaRuntimeDockerImage: + # 定义是否构建参数 + build: true + test: false + platform: [linux/amd64] + docker_file: + path: AI/oneapi/2024.1/23/basekit/Dockerfile + scene: + args: [] + tags: [2024.1-23-basekit] + registry: [*ACR_PROD] + # 测试配置 + test_config: [*WORKSPACE, *PROJECT, *TEST_SUITE, *TEST_CONF, '', *CLOUD_SERVER_TAG[0], ''] diff --git a/AI/oneapi/version.yml b/AI/oneapi/version.yml new file mode 100644 index 0000000..17d6d35 --- /dev/null +++ b/AI/oneapi/version.yml @@ -0,0 +1,14 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: oneapi + # training 训练类, inference 推理类 + image_type: base + versions: + 2024.1: + # 对 AI 框架版本对 python 版本的要求 + python_version: [] + # gpu 对 Intel(R) oneAPI 版本的要求 + oneapi_version: [] + # 对 baseos 的要求,*AnolisOS8.6 表示 Anolis8.6 + baseos_version: [*AnolisOS23] -- Gitee