In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to build a deep learning platform for Ubuntu20.4. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
1. After downloading the corresponding operating system on the official website, use floppy disk pass to create a boot image
2. In the system installation interface, select to install Ubuntu, wait a few minutes, set user name, computer name, password and other information to restart.
3. After entering the system, if you find that the system has no network connection, you can use netplan to configure the network. The specific steps are as follows:
Enter ip-an in terminal to view the connected network card:
Ip-a
Use the administrator identity to configure the Nic information:
Sudo vim / etc/netplan/01-network-manager-all.yml
Configure the connected network card in this article:
# use spaces in blank spaces, do not use TABnetwork: ethernets: eno2: # here is the corresponding network card name dhcp4: no # static address is No, dynamic address is Yes dhcp6: no # static address is No The dynamic address is Yes addresses: [192.168.1.103 24] # static IP address and subnet mask gateway4: 192.168.1.1 # gateway nameservers: # DNS server addresses: [8.8.8.8,114.114.114] # address configuration version: 2 renderer: NetworkManager
After saving and exiting, use the command to make it effective:
Sudo netplan apply
Set up and open SSH:
After the sudo apt install openssh-server# installation is complete, view / start the ssh service sudo systemctl status/start ssh
4. Python3.X is already installed in Ubuntu20.4. If you build a deep learning platform, you only need to install project environment management tools Anaconda, GPU computing platform CUDA and deep learning framework Pytorch (you can choose according to your own situation).
Install Anaconda and create a project environment
# download Anacondawget https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh# to run, install sudo bash Anaconda3-2020.07-Linux-x86_64.sh# in the process, pay attention to add the installation path to Path. You can use conda to test conda list#. If an error is reported, the addition is not successful. You can manually add sudo vim ~ / .bashrc # at the beginning of the file. Add the following content after export PATH=/home/iip_ski/anaconda3/bin:$PATH# save is closed, run effective source ~ / .bashrc
4.2. install graphics card driver and CUDA
For example:
The position of the red box in the figure is the minimum driver version. View the following figure in the driver download interface:
When you are done below, switch to no graphical interface, in terminal:
Init driver needs to log back in # to start installing the video driver sudo chmod + 777 NVIDIA-Linux-x86_64-455.38.runsudo. / NVIDIA-Linux-x86_64-455.38.run-no-opengl-files # during: # whether to install other versions of the video driver-No # whether to install 32-bit or not
After the installation is complete, use nvidia-smi to test whether the installation is successful.
Start the CUDA installation:
During sudo chmod + 777 cuda_11.1.1_455.32.00_linux.runsudo. / cuda_11.1.1_455.32.00_linux.run# installation: # start installation, terminate / continue-choose to continue # installation agreement-accept # installation option-X means selected, remove the video card driver option Other normal installation # installation completed # add CUDA to the environment parameters sudo vim ~ / .bashrc # after conda in the file, add the following content export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64export PATH=$PATH:/usr/local/cuda/binexport CUDA_HOME=$CUDA_HOME:/usr/local/cuda# save and exit source ~ / .bashrc
4.3. install the deep learning framework-- take Pytorch as an example
First, enable the virtual project environment. If there is no virtual environment, you can create a new
# the virtual environment used to build the project conda create-n XXX # XXX is the project name, and Chinese is not recommended. # call conda activate XXX after the project is created successfully
Before installing the corresponding framework, in order to improve the installation speed, the Conda can be replaced with a domestic source, which can be ignored abroad.
Conda config-add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config-set show_channel_urls yes
Install Pytorch:
Conda install pytorch torchvision torchaudio cudatoolkit=11.0-c pytorch
After the installation is complete, conduct a CUDA test:
Python > > import torch > > otrch.randn (2Power3). Cuda () # if the normal output does not report an error, the installation is successful. This is the end of this article on "how to build a deep learning platform for Ubuntu20.4". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.