Rebuild ubuntu 22.04

1 minute read

Published:

This is a post about how to rebuild ubuntu 22.04, and install some useful tools.

Terminal install

  • upgrade sudo apt-get upgrade -y
  • update sudo apt-get update
  • git sudo apt install git-all
  • python3 / pip3 / venv sudo apt install python3-dev python3-pip python3-venv
  • flameshot sudo apt install flameshot
  • vim sudo apt-get install vim
  • Discord snap install discord

First-Time Git Setup

  • git config --global user.name [your username]
  • git config --global user.email [your user email]

VsCode

  • Website
  • Download command sudo dpkg -i [Filename]

Edge

  • Website
  • Download command sudo dpkg -i [Filename]

Chinese input

  • Download command sudo apt install ibus-chewing
  • reboot
  • Keyboard - Input Sources - Other - Chinese (chewing)

Anaconda

Tensorflow with conda

  • stackoverflow
  • Create env conda create -n [env name] python=3.8
  • Activate env conda activate [env name]
  • Check conda install package: conda list
  • Install tensorflow conda install tensorflow
  • Install tensorflow-gpu conda install tensorflow-gpu
  • scikit-learn conda install -c anaconda scikit-learn
  • matplotlib conda install matplotlib
  • pandas conda install pandas
  • quit env conda deactivate

CUDA and cuDnn

Driver

  • ubuntu-drivers devices (find the recommand to install)
  • sudo ubuntu-drivers autoinstall
  • reboot
  • nvidia-smi can check

CUDA

  • check install version
  • With tensorflow 2.4.1, I choose CUDA 11.0 and cuDNN 8.0
  • But since my Ubuntu version is 22.04, so the CUDA version change to 11.7
  • May has a error

Just continue and don’t install driver again

  • Add some line by vim ~/.bashrc
    • export PATH="/usr/local/cuda-11.7/bin:$PATH"
    • export LD_LIBRARY_PATH="/usr/local/cuda-11.7/lib64:$LD_LIBRARY_PATH"
  • source ~/.bashrc
  • nvcc -V

cuDNN

  • Website
  • After install sudo dpkg -i cudnn-local-repo-ubuntu2204-8.6.0.163_1.0-1_amd64.deb
    sudo apt-key add /var/cudnn-local-repo-ubuntu2204-8.6.0.163_1.0-1_amd64/7fa2af80.pub
    sudo apt-get update
    sudo apt-get install libcudnn8 libcudnn8-dev
    
  • check cuDNN version dpkg -l | grep libcudnn

PyTorch with conda

  • Website
  • conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
  • GPU conda install -c conda-forge pytorch-gpu

NAS for MLLab

  • smb://mllab.asuscomm.com/mllab-public/
  • [your username]
  • [your password]

Printer for MLLab

  • Additional Printer Settings…
  • Add icon
  • Network Printer
  • Choose Printer (Kyocera ECOSYS / Epson AL-M310DN)
  • Forward
  • Print Test page

Leave a Comment