Skip to content

Instantly share code, notes, and snippets.

@BunHouth
Last active August 7, 2021 08:09
Show Gist options
  • Save BunHouth/1537c7c6e2a31fda26e5ef14113f170d to your computer and use it in GitHub Desktop.
Save BunHouth/1537c7c6e2a31fda26e5ef14113f170d to your computer and use it in GitHub Desktop.
emeth.ubuntu.md

Swap RAM

sudo fallocate -l 32G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
free -h
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Dependency Installation

Install NodeJS

sudo apt update
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install -y nodejs
sudo apt-get install gcc g++ make
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

Intall Python

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.6 python3-pip
sudo apt-get install -y python-sqlite
sudo apt install sqlite3 libsqlite3-dev
sudo apt-get install build-essential libssl-dev python-dev
sudo apt-get install libv8-dev

Using python command instead of python3

sudo ln -s /usr/bin/python3 /usr/bin/python
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin

sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub

sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"

sudo apt-get update
sudo apt-get -y install cuda cuda-drivers

Add Line below to .bashrc or .zshrc

export PATH="/usr/local/cuda-11.3/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.3/lib64:$LD_LIBRARY_PATH"
tar -xzvf cudnn-11.3-linux-x64-v8.2.1.32.tgz
cd cudnn-11.3-linux-x64-v8.2.1.32
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

Install Nvidia machine learning

echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" | sudo tee /etc/apt/sources.list.d/nvidia-ml.list

sudo apt-get install libnccl2 libnccl-dev

References

emethContractAddress 0xb45A65b47e981BE6cCA5f9d973102f920af12351

0xb5Da9261fa6966Bf064A65d26C57C92C7934A3C1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment