Useful notes about Ubuntu (especially for Deep Learning code developers)
- 25 Useful Basic Commands of
apt-get
for Package Management - How To Install
pip
to Manage Python Packages in Linux - How to Install Latest Python 3.6 Version in Linux
- 20 Command Line Tools to Monitor Linux Performance
- Check CUDA and cuDNN version
- Add “New Document” back to the right-click menu in Ubuntu 18.04
- 3 Command Line Tools to Install Local Debian (.DEB) Packages
- 15 Practical Examples of
dpkg commands
for Debian Based Distros - General notes about Package Management in Ubuntu
- dpkg
- Apt
- Learn more about how to install docker [Install Docker Community Edition(CE)]
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade http://download.pytorch.org/whl/cu90/torch-0.3.1-cp35-cp35m-linux_x86_64.whl
- Type
pip3 install --upgrade torchvision
- First download its
whl
file via the below command: wget https://files.pythonhosted.org/packages/e3/e8/9496b0663fef0415094a598deb1099aaa2a69f2bc9d924cafd05677d3c85/tensorflow_gpu-1.7.0-cp35-cp35m-manylinux1_x86_64.whl
- Then type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade YourDownloadedAddress/tensorflow_gpu-1.7.0-cp35-cp35m-manylinux1_x86_64.whl
- Note that in the above command the
YourDownloadedAddress
is the address ofwhl
file (e.g.,/home/smith/Programs
)
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade mxnet-cu90 --pre
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade keras
Suppose one wants to install 2 different versions of a deep learning package (e.g., PyTorch) on a single system. We assume that the PyTorch 0.3.1 has been installed via pip3. Now we want to install PyTorch 0.4.0 (i.e., we want to have both versions on a signle system). To this end, follow below instructions:
- 1-
sudo mkdir /opt/pytorch4
- 2-
sudo chown -R username:username /opt/pytorch4
(Note: instead ofusername
you must type your username (e.g., smith)) - 3- Download the *.whl file of PyTorch 0.4.0 from its Pip3 Repository
- 4- Extract it
- 5- Copy all of the extracted files into "/opt/pytorch4"
- 6- When run Python3 the type:
import sys
sys.path.insert(0, "/opt/pytorch4/")
import torch
print(torch.__version__)
- 7- Note: If you don't type the above commands, then the default version of PyTorch (i.e., the previous installed it via pip3 (0.3.1 version)) is worked.
- Type
sudo apt-get update
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
apt install python3-pip
- After install pip3 then upgrade it via the below command:
pip3 install --upgrade setuptools pip
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade opencv-python
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade opencv-contrib-python
Install Dlib:
sudo apt-get install build-essential cmake
sudo apt-get install libgtk-3-dev
sudo apt-get install libboost-all-dev
sudo su
pip3 install dlib
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade Pillow
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade -U scikit-learn
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade h5py
- Type
sudo su
in ubuntu terminal - After inserting your ubuntu's password, then type
pip3 install --upgrade jupyter
- How to Install OpenCV in Ubuntu 16.04 LTS for C / C++
- Ubuntu 16.04: How to install OpenCV
- How to install OpenCV 4 on Ubuntu
Ctrl + Alt + T
that opened a terminal window.Ctrl + Shift + T
that opened a new tab in a terminal.
sudo apt show cuda
apt search cudnn