Last active
September 7, 2021 14:55
-
-
Save shubhamagarwal92/9e49dca425f06a8c55fa2ac696105f88 to your computer and use it in GitHub Desktop.
Setup new machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check number of cpus | |
grep -c ^processor /proc/cpuinfo | |
sudo apt-get install tmux | |
sudo apt-get install htop | |
sudo apt install git | |
# Conda | |
sudo mkdir -p /scratch/shubham/packages | |
sudo chown -R shubham /scratch/shubham | |
cd /scratch/shubham/packages | |
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh | |
# If you install ufw for firewall and security, dont forget to do; reference: | |
# https://www.digitalocean.com/community/questions/after-installing-the-firewall-can-not-log-in-with-ssh | |
sudo ufw allow ssh | |
# Get specs | |
lsb_release -a | |
cat /etc/os-release | |
hostnamectl | |
uname -r | |
# Change root password | |
sudo -i | |
sudo passwd | |
# Change user password | |
sudo passwd | |
# add user | |
sudo adduser XYZ | |
# Customize your prompt | |
# Ref: https://www.ostechnix.com/hide-modify-usernamelocalhost-part-terminal/ | |
echo "export PS1="\[\033[01;32m\]\u@gpu:\w\$ "" >> ~/.bashrc | |
# Reboot remote machine | |
# Ref: https://phoenixnap.com/kb/restart-linux-using-command-prompt | |
reboot | |
# sudo shutdown -r now | |
# Copy ssh keys | |
# Ref: https://apple.stackexchange.com/questions/210109/how-to-store-ssh-credentials-in-terminal | |
mkdir -p ~/.ssh | |
cat ~/.ssh/id_rsa.pub | ssh ${machine_name} "cat >> ~/.ssh/authorized_keys" | |
# CuDNN | |
# https://stackoverflow.com/a/36978616 | |
sudo apt install nvidia-cuda-toolkit | |
# Check cuda version | |
# https://medium.com/@changrongko/nv-how-to-check-cuda-and-cudnn-version-e05aa21daf6c | |
cat /usr/local/cuda/version.txt | |
# If still having issues with cuda for RNN in torch: RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED for rnn | |
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch | |
# Might run into numpy errors then https://github.com/pytorch/pytorch/issues/2731 | |
pip install -U numpy | |
# Verify using https://stackoverflow.com/a/48152675 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment