From e403e4a8b76e89ce363365de4e1e46673f63a084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cheen=20Hau=2C=20=E4=BF=8A=E8=B1=AA?= <33478814+chtanch@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:30:30 +0800 Subject: [PATCH] Add APT install instructions for oneAPI (#9875) * Add APT installer * Include reviewer suggestions * Add note - ensure matching version of oneAPI and pytorch/ipex * Fix 'command line installer' * Fix formatting. Address review comments * Append ':' to '..by running the following commands' * Fix formatting * achieve -> archive --- .../source/doc/LLM/Overview/install_gpu.md | 104 +++++++++++++++++- 1 file changed, 99 insertions(+), 5 deletions(-) diff --git a/docs/readthedocs/source/doc/LLM/Overview/install_gpu.md b/docs/readthedocs/source/doc/LLM/Overview/install_gpu.md index 47b7a187..48d95a89 100644 --- a/docs/readthedocs/source/doc/LLM/Overview/install_gpu.md +++ b/docs/readthedocs/source/doc/LLM/Overview/install_gpu.md @@ -41,7 +41,7 @@ pip install --pre --upgrade bigdl-llm[xpu] -f https://developer.intel.com/ipex-w ### Install BigDL-LLM From Wheel -If you encounter network issues when installing IPEX, you can also install BigDL-LLM dependencies for Intel XPU from source achieves. First you need to download and install torch/torchvision/ipex from wheels listed below before installing `bigdl-llm`. +If you encounter network issues when installing IPEX, you can also install BigDL-LLM dependencies for Intel XPU from source archives. First you need to download and install torch/torchvision/ipex from wheels listed below before installing `bigdl-llm`. Download the wheels on Windows system: @@ -169,9 +169,50 @@ BigDL-LLM for GPU supports on Linux has been verified on: * Step 2: Download and install `Intel® oneAPI Base Toolkit `_ with version 2024.0. OneDNN, OneMKL and DPC++ compiler are needed, others are optional. - .. seealso:: + Intel® oneAPI Base Toolkit 2024.0 installation methods: - We recommend you to use `this offline package `_ to install oneapi. + .. tabs:: + .. tab:: APT installer + + Step 1: Set up repository + + .. code-block:: bash + + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt update + + Step 2: Install the package + + .. code-block:: bash + + sudo apt install -y intel-basekit + + .. note:: + + You can uninstall the package by running the following command: + + .. code-block:: bash + + sudo apt autoremove intel-basekit + + .. tab:: Offline installer + + Using the offline installer allows you to customize the installation path. + + .. code-block:: bash + + wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/20f4e6a1-6b0b-4752-b8c1-e5eacba10e01/l_BaseKit_p_2024.0.0.49564_offline.sh + sudo sh ./l_BaseKit_p_2024.0.0.49564_offline.sh + + .. note:: + + You can also modify the installation or uninstall the package by running the following commands: + + .. code-block:: bash + + cd /opt/intel/oneapi/installer + sudo ./installer .. tab:: PyTorch 2.0 @@ -188,10 +229,58 @@ BigDL-LLM for GPU supports on Linux has been verified on: * Step 2: Download and install `Intel® oneAPI Base Toolkit `_ with version 2023.2. OneDNN, OneMKL and DPC++ compiler are needed, others are optional. - .. seealso:: + Intel® oneAPI Base Toolkit 2023.2 installation methods: - We recommend you to use `this offline package `_ to install oneapi. + .. tabs:: + .. tab:: APT installer + Step 1: Set up repository + + .. code-block:: bash + + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt update + + Step 2: Install the packages + + .. code-block:: bash + + sudo apt install -y intel-oneapi-common-vars=2023.2.0-49462 \ + intel-oneapi-compiler-cpp-eclipse-cfg=2023.2.0-49495 intel-oneapi-compiler-dpcpp-eclipse-cfg=2023.2.0-49495 \ + intel-oneapi-diagnostics-utility=2022.4.0-49091 \ + intel-oneapi-compiler-dpcpp-cpp=2023.2.0-49495 \ + intel-oneapi-mkl=2023.2.0-49495 intel-oneapi-mkl-devel=2023.2.0-49495 \ + intel-oneapi-mpi=2021.10.0-49371 intel-oneapi-mpi-devel=2021.10.0-49371 \ + intel-oneapi-tbb=2021.10.0-49541 intel-oneapi-tbb-devel=2021.10.0-49541\ + intel-oneapi-ccl=2021.10.0-49084 intel-oneapi-ccl-devel=2021.10.0-49084\ + intel-oneapi-dnnl-devel=2023.2.0-49516 intel-oneapi-dnnl=2023.2.0-49516 + + .. note:: + + You can uninstall the package by running the following command: + + .. code-block:: bash + + sudo apt autoremove intel-oneapi-common-vars + + .. tab:: Offline installer + + Using the offline installer allows you to customize the installation path. + + .. code-block:: bash + + wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/992857b9-624c-45de-9701-f6445d845359/l_BaseKit_p_2023.2.0.49397_offline.sh + sudo sh ./l_BaseKit_p_2023.2.0.49397_offline.sh + + .. note:: + + You can also modify the installation or uninstall the package by running the following commands: + + .. code-block:: bash + + cd /opt/intel/oneapi/installer + sudo ./installer ``` ### Install BigDL-LLM From PyPI @@ -204,6 +293,11 @@ We recommend using [miniconda](https://docs.conda.io/en/latest/miniconda.html) t ``bigdl-llm`` is tested with Python 3.9, 3.10 and 3.11. Python 3.9 is recommended for best practices. ``` +```eval_rst +.. important:: + Make sure you install matching versions of BigDL-LLM/pytorch/IPEX and oneAPI Base Toolkit. BigDL-LLM with Pytorch 2.1 should be used with oneAPI Base Toolkit version 2024.0. BigDL-LLM with Pytorch 2.0 should be used with oneAPI Base Toolkit version 2023.2. +``` + ```eval_rst .. tabs:: .. tab:: PyTorch 2.1