diff --git a/xFasterTransformer/1.3.1/23/xft/Dockerfile b/xFasterTransformer/1.3.1/23/xft/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f3a9078155e5bcf490c19a5856a33d480cd8899f --- /dev/null +++ b/xFasterTransformer/1.3.1/23/xft/Dockerfile @@ -0,0 +1,30 @@ +FROM openanolis/anolisos:23 +LABEL \ + maintainer="OpenAnolis AI SIG" \ + org.opencontainers.image.title="xFasterTransformer" \ + org.opencontainers.image.version="1.3.1-23-xft" + + +RUN dnf install anolis-epao-release -y +RUN dnf install -y wget numactl procps python3 python3-pip gzip git vim level-zero-devel +RUN pip install --no-cache-dir torch==2.0.1 -i http://mirrors.cloud.aliyuncs.com/pypi/simple --trusted-host mirrors.cloud.aliyuncs.com +RUN pip install --no-cache-dir cmake==3.26.1 -i http://mirrors.cloud.aliyuncs.com/pypi/simple --trusted-host mirrors.cloud.aliyuncs.com +RUN pip install --no-cache-dir transformers==4.30.0 sentencepiece==0.1.99 xfastertransformer==1.3.1 -i http://mirrors.cloud.aliyuncs.com/pypi/simple --trusted-host mirrors.cloud.aliyuncs.com +# RUN pip install --no-cache-dir accelerate==0.23.0 -i http://mirrors.cloud.aliyuncs.com/pypi/simple --trusted-host mirrors.cloud.aliyuncs.com + +RUN echo -e "[oneAPI]\nname=IntelĀ® oneAPI repository\nbaseurl=https://yum.repos.intel.com/oneapi\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=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.3 +RUN echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bashrc + +WORKDIR /usr/local/ + +RUN wget https://gitee.com/qccz123456/oneDNN/releases/download/v0.21/mklml_lnx_2019.0.5.20190502.tgz \ + && tar -xzf mklml_lnx_2019.0.5.20190502.tgz \ + && rm -f mklml_lnx_2019.0.5.20190502.tgz + +RUN echo 'export LD_LIBRARY_PATH=/usr/local/mklml_lnx_2019.0.5.20190502/lib:$LD_LIBRARY_PATH' >> /root/.bashrc +RUN echo 'export LD_PRELOAD=libiomp5.so:$LD_PRELOAD' >> /root/.bashrc + +WORKDIR /root/ + diff --git a/xFasterTransformer/README.md b/xFasterTransformer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..586efdc81ddc36553ebda989c522aa78ac94fd5c --- /dev/null +++ b/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.3.1-23-xft`](https://gitee.com/anolis/docker-images/blob/master/xFasterTransformer/1.3.1/23/xft/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.3.1-23-xft +``` + +# 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/xFasterTransformer/versions.yaml b/xFasterTransformer/versions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4849585deb0160378a8affda8bb54d65019320d2 --- /dev/null +++ b/xFasterTransformer/versions.yaml @@ -0,0 +1,10 @@ +xFasterTransformer: + 1.3.1: + anolis: + registries: + - anolis + images: + - dockerfile: xFasterTransformer/1.3.1/23/xft/Dockerfile + builds: + - tags: + - 1.3.1-23-xft