install deepspeed with sparse attention dep

本文详细介绍了如何在您的环境中安装DeepSpeed,这是一个用于加速深度学习训练的库,特别是针对使用稀疏注意力机制的模型。通过遵循步骤,您可以成功配置并开始利用DeepSpeed提升模型训练效率。
摘要由CSDN通过智能技术生成
docker pull ubuntu:18.04
# run the image to create a container based on it
docker run -it ubuntu:18.04 bash
# update the apt software source index
   19  apt update
   20  apt install git
    8  apt install clang-10
    5  apt install llvm-9-dev
    6  apt install cmake

# clone the deepspeed, which is based on the version of torch 1.2 ( with cuda 10.0 )
# we need to install the torch 1.6.0 with minimium cuda version of 10.2
   21  git clone https://github.com/microsoft/DeepSpeed.git
   22  cd DeepSpeed/
   26  apt install python3 pip3
   27  apt install python3 python-pip
   31  apt install wget
   32  wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
   33  bash Miniconda3-latest-Linux-x86_64.sh 
   36  eval "$(/root/miniconda3/bin/conda shell.bash hook)" 
   37  conda init
   38  conda create -n tr cudatoolkit=10.2 pytorch=1.5
   39  conda activate tr
   42  apt-get install llvm-9-dev software-properties-common
   43  pip install triton

# install cuda=10.2
   45  wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
   73  sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
   46  wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
   76  sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb
   77  sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub
   78  sudo apt-get update
   79  sudo apt-get -y install cuda

# use the key bind of ctrl + d to exit the container 
# use `docker ps -a` to query the info of docker container and find the exit
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值