{"id":20081499,"url":"https://github.com/ahkarami/ubuntu-for-deep-learning","last_synced_at":"2025-05-06T00:31:18.252Z","repository":{"id":95578736,"uuid":"129235512","full_name":"ahkarami/Ubuntu-for-Deep-Learning","owner":"ahkarami","description":"Useful notes about Ubuntu (especially for Deep Learning code developers)","archived":false,"fork":false,"pushed_at":"2022-09-30T21:41:25.000Z","size":485,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T06:06:15.528Z","etag":null,"topics":["deep-learning","install","machine-learning","opencv","pip","python","pytorch","tensorflow","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahkarami.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-12T10:40:26.000Z","updated_at":"2023-01-29T22:53:25.000Z","dependencies_parsed_at":"2023-05-20T22:45:25.511Z","dependency_job_id":null,"html_url":"https://github.com/ahkarami/Ubuntu-for-Deep-Learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahkarami%2FUbuntu-for-Deep-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahkarami%2FUbuntu-for-Deep-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahkarami%2FUbuntu-for-Deep-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahkarami%2FUbuntu-for-Deep-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahkarami","download_url":"https://codeload.github.com/ahkarami/Ubuntu-for-Deep-Learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252598277,"owners_count":21774231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","install","machine-learning","opencv","pip","python","pytorch","tensorflow","ubuntu"],"created_at":"2024-11-13T15:39:18.092Z","updated_at":"2025-05-06T00:31:18.246Z","avatar_url":"https://github.com/ahkarami.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ubuntu-for-Deep-Learning\nUseful notes about Ubuntu (especially for **Deep Learning** code developers)\n\n![Logo](./FinalLogo.jpg)\n\n## General useful links:\n- [Beginner's Guide for linux](https://www.tecmint.com/free-online-linux-learning-guide-for-beginners/)\n- [Linux tricks](https://www.tecmint.com/tag/linux-tricks/)\n\n## Other important \u0026 useful links:\n- [25 Useful Basic Commands of `apt-get` for Package Management](https://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/)\n- [How To Install `pip` to Manage Python Packages in Linux](https://www.tecmint.com/install-pip-in-linux/)\n- [How to Install Latest _Python 3.6_ Version in Linux](https://www.tecmint.com/install-python-in-linux/)\n- [20 Command Line Tools to Monitor Linux Performance](https://www.tecmint.com/command-line-tools-to-monitor-linux-performance/)\n- [Check CUDA and cuDNN version](https://medium.com/@changrongko/nv-how-to-check-cuda-and-cudnn-version-e05aa21daf6c)\n- [Add “New Document” back to the right-click menu in Ubuntu 18.04](https://vitux.com/add-new-document-back-to-the-right-click-menu-in-ubuntu-18-04/)  \n\n### Package Management Notes in Ubuntu:\n- [3 Command Line Tools to Install Local Debian (.DEB) Packages](https://www.tecmint.com/install-local-deb-packages-in-debian-ubuntu-linux-mint/)\n- [15 Practical Examples of `dpkg commands` for Debian Based Distros](https://www.tecmint.com/dpkg-command-examples/)\n- [General notes about Package Management in Ubuntu](https://help.ubuntu.com/lts/serverguide/package-management.html.en)\n- [dpkg](https://help.ubuntu.com/lts/serverguide/dpkg.html.en)\n- [Apt](https://help.ubuntu.com/lts/serverguide/apt.html.en)\n\n### Python Virtual Environments:\n- [Python Virtual Environments](https://realpython.com/python-virtual-environments-a-primer/)\n\n### Managing Python Version Dependencies:\n- [Managing Dependencies in Python](https://tech.instacart.com/freezing-pythons-dependency-hell-in-2018-f1076d625241)\n\n### Docker:\n- [Learn more about how to install docker](https://github.com/Microsoft/MMdnn/blob/master/docs/InstallDockerCE.md) [_Install Docker Community Edition(CE)_]\n\n### Set \u0026 Change DNS on Ubuntu Server:\n- [How to set DNS nameservers on Ubuntu](https://linuxize.com/post/how-to-set-dns-nameservers-on-ubuntu-18-04/)   \n- [Ubuntu DNS nameservers](https://phoenixnap.com/kb/ubuntu-dns-nameservers)   \n\n## Install deep learning packages:\n\n### Install PyTorch 0.3.1 (for python 3.5 \u0026 CUDA 9.0):\n- Type `sudo su` in ubuntu terminal\n- 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`\n- Type `pip3 install --upgrade torchvision`\n\n### Install TensorFlow 1.7 GPU based (for python 3.5 \u0026 CUDA 9.0 \u0026 cuDNN 7.0.5):\n- First download its `whl` file via the below command:\n- ```wget https://files.pythonhosted.org/packages/e3/e8/9496b0663fef0415094a598deb1099aaa2a69f2bc9d924cafd05677d3c85/tensorflow_gpu-1.7.0-cp35-cp35m-manylinux1_x86_64.whl```\n- Then type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade YourDownloadedAddress/tensorflow_gpu-1.7.0-cp35-cp35m-manylinux1_x86_64.whl`\n- **Note** that in the above command the `YourDownloadedAddress` is the address of `whl` file (_e.g.,_ `/home/smith/Programs`) \n\n### Install MXNet 1.2.0 (for python 3.5 \u0026 CUDA 9.0):\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade mxnet-cu90 --pre`\n\n### Install Keras 2.2.0 (for python 3.5 \u0026 CUDA 9.0 \u0026 cuDNN 7.0.5 \u0026 TensorFlow Backend):\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade keras`\n\n### Install 2 Different Versions of a package (_e.g.,_ PyTorch) on a Single System:\nSuppose 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:\n- 1- `sudo mkdir /opt/pytorch4`\n- 2- `sudo chown -R username:username /opt/pytorch4` (**Note:** instead of `username` you must type your username (_e.g.,_ smith))\n- 3- Download the _*.whl_ file of _PyTorch 0.4.0_ from its [Pip3 Repository](http://download.pytorch.org/whl/cu90/torch-0.4.0-cp35-cp35m-linux_x86_64.whl)\n- 4- Extract it\n- 5- Copy all of the extracted files into \"/opt/pytorch4\"\n- 6- When run Python3 the type:\n```python\nimport sys\nsys.path.insert(0, \"/opt/pytorch4/\")\nimport torch\nprint(torch.__version__) \n```\n- 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.\n\n\n## Install required packages:\n\n### Install `pip3` on ubuntu:\n- Type `sudo apt-get update`\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `apt install python3-pip`\n- After install _pip3_ then upgrade it via the below command:\n- `pip3 install --upgrade setuptools pip`\n\n### Install opencv-python:\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade opencv-python`\n\n### Install opencv-contrib-python:\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade opencv-contrib-python`\n\n### Install [Dlib](https://github.com/davisking/dlib):\n- `sudo apt-get install build-essential cmake`\n- `sudo apt-get install libgtk-3-dev`\n- `sudo apt-get install libboost-all-dev`\n- `sudo su`\n- `pip3 install dlib`\n\n### Install Pillow:\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade Pillow`\n\n### Install scikit-learn:\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade -U scikit-learn`  \n\n### Install h5py:\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade h5py`  \n\n### Install Jupyter Notebook:\n- Type `sudo su` in ubuntu terminal\n- After inserting your ubuntu's password, then type `pip3 install --upgrade jupyter`  \n\n### Install OpenCV in Ubuntu for C++:\n- [How to Install OpenCV in Ubuntu 16.04 LTS for C / C++](http://www.codebind.com/cpp-tutorial/install-opencv-ubuntu-cpp/)\n- [Ubuntu 16.04: How to install OpenCV](https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/)\n- [How to install OpenCV 4 on Ubuntu](https://www.pyimagesearch.com/2018/08/15/how-to-install-opencv-4-on-ubuntu/)  \n\n## Other Useful Notes:\n\n### Open New Terminal:\n- `Ctrl + Alt + T` that opened a terminal window.\n- `Ctrl + Shift + T` that opened a new tab in a terminal.\n\n### Show the CUDA Installed version:\n- `sudo apt show cuda`\n\n### Show the CuDNN Installed version:\n- `apt search cudnn`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahkarami%2Fubuntu-for-deep-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahkarami%2Fubuntu-for-deep-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahkarami%2Fubuntu-for-deep-learning/lists"}