diff --git a/AI/xfastertransformer/1.7.3/23/Dockerfile b/AI/xfastertransformer/1.7.3/23/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6b323303f744e927351814db2dac6c555da94e4d --- /dev/null +++ b/AI/xfastertransformer/1.7.3/23/Dockerfile @@ -0,0 +1,34 @@ + +FROM registry.openanolis.cn/openanolis/anolisos:23 + +LABEL \ + maintainer="OpenAnolis AI SIG" \ + org.opencontainers.image.title="xfastertransformer" \ + org.opencontainers.image.version="1.7.3-23" + +RUN dnf install anolis-epao-release -y +RUN dnf install -y wget numactl python3-pip git vim level-zero-devel +RUN pip3 install --no-cache-dir torch==2.3.1 --index-url https://download.pytorch.org/whl/cpu +RUN pip3 install --no-cache-dir transformers==4.41.2 sentencepiece==0.1.99 accelerate==0.23.0 protobuf==4.25.3 tiktoken==0.6.0 +RUN pip3 install --no-cache-dir xfastertransformer==1.7.3 + +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 -y intel-oneapi-ccl-2021.10.0 intel-oneapi-compiler-dpcpp-cpp-runtime-2023.2.1 + +RUN echo 'source /opt/intel/oneapi/setvars.sh' >> /root/.bashrc +RUN echo "export \$(python -c 'import xfastertransformer as xft; print(xft.get_env())')" >> ~/.bashrc + +WORKDIR /root/ + +RUN git clone --depth 1 -b v1.7.3 https://github.com/intel/xFasterTransformer.git + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/AI/xfastertransformer/README.md b/AI/xfastertransformer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..29117b74b8758457c3a94104d097871d84b1b625 --- /dev/null +++ b/AI/xfastertransformer/README.md @@ -0,0 +1,31 @@ +# xFasterTransformer + +# 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 + +- [`1.7.3-23`](https://gitee.com/anolis/anolis-container/tree/master/AI/xfastertransformer/1.7.3/23/Dockerfile) + +# Supported architectures + +- x86-64 + +# Build reference + +## Build multi-arch images and push to registry: +```shell +docker buildx build -t "openanolis/xfastertransformer:$VERSION" --platform linux/amd64 . --push +``` + +# Usage + +## Start a xFasterTransformer instance +```shell +docker run --name xfastertransformer-test openanolis/xfastertransformer:1.7.3-23 +``` + +# xFasterTransformer +xFasterTransformer is an exceptionally optimized solution for large language models (LLM) on the X86 platform, which is similar to FasterTransformer on the GPU platform. xFasterTransformer is able to operate in distributed mode across multiple sockets and nodes to support inference on larger models. Additionally, it provides both C++ and Python APIs, spanning from high-level to low-level interfaces, making it easy to adopt and integrate. diff --git a/AI/xfastertransformer/buildspec.yml b/AI/xfastertransformer/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..8f7f5266508efccd33d76209e22b5b38391b88c1 --- /dev/null +++ b/AI/xfastertransformer/buildspec.yml @@ -0,0 +1,36 @@ +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=ai_container + test_case: &TEST_CASE pytorch_ai_container + cloud_server_tag: &CLOUD_SERVER_TAG [anolis-container-ci-x86] + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildxFasterTransformerDockerImage: + # 定义是否构建参数 + build: true + platform: [linux/amd64] + docker_file: + path: AI/xfastertransformer/1.7.3/23/Dockerfile + scene: + args: [] + tags: [1.7.3-23] + registry: [*ACR_PROD] + # 测试配置 + test_config: [*WORKSPACE, *PROJECT, *TEST_SUITE, *TEST_CONF, *TEST_CASE, *CLOUD_SERVER_TAG[0], ''] diff --git a/AI/xfastertransformer/version.yml b/AI/xfastertransformer/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..f51c5eb970cfb5cf3fab72c38bdcdaf23ecd78e7 --- /dev/null +++ b/AI/xfastertransformer/version.yml @@ -0,0 +1,14 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: xfastertransformer + # training 训练类, inference 推理类 + image_type: inference + versions: + 1.7.3: + # 对 AI 框架版本对 python 版本的要求 + python_version: [] + # gpu 对 cuda 版本的要求 + cuda_version: [] + # 对 baseos 的要求,*AnolisOS8.6 表示 Anolis8.6 + baseos_version: [*AnolisOS23] \ No newline at end of file