# full progress of dlrm container ###### tags: `DLRM` ## container ``` #nvidia docker singularity pull docker://nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 ``` ## 先建成sandbox再編輯 basic def for singularity ``` BootStrap: library From: ubuntu:18.04 %post apt -y update apt -y install wget git vim build-essential curl apt install -y software-properties-common add-apt-repository ppa:ubuntu-toolchain-r/test add-apt-repository main add-apt-repository universe add-apt-repository restricted add-apt-repository multiverse apt -y update apt install -y gcc-7 gcc-8 gcc-9 %environment export LC_ALL=C %runscript cd / ``` 更換gcc版本#但g++沒換會出事 `update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90` 其他載的 ``` ##gdrcopy requirement sudo apt install check libsubunit0 libsubunit-dev ##else apt install -y sudo libnuma-dev doxygen apt install -y fakeroot apt install -y autoconf automake libtool #singularity apt install build-essential libssl-dev uuid-dev libgpgme11-dev squashfs-tools libseccomp-dev pkg-config cryptsetup-bin #anaconda3 apt-get install -y libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh Anaconda3-2021.05-Linux-x86_64.sh ``` [cuda toolkit](https://developer.nvidia.com/cuda-toolkit-archive) [download NCCL](https://developer.nvidia.com/nccl) ``` #NCCL-2.9.3 with cuda_10.1(with root) apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" apt update apt install libnccl2=2.8.3-1+cuda10.1 libnccl-dev=2.8.3-1+cuda10.1 ``` 用其他版本的pytorch pytorch1.7.1 with cuda10.1 ``` conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing conda install -c pytorch magma-cuda101 git clone --recursive https://github.com/pytorch/pytorch git clone --branch v1.7.1 https://github.com/pytorch/pytorch.git pytorch-1.7.1 cd pytorch-1.7.1 git submodule sync git submodule update --init --recursive ```