Configuration of deep learning environment in server

Installation process

On November 17th, I went to a university to attend an academic conference on the weekend. The reason was that after using a public wired network in a university, after remotely connecting to the server, the hacker used the 22 port opened by ssh to tamper with the configuration of the host, so that as long as one connection When connecting to the network, the server CPU will be fully occupied. It is estimated that as soon as the network is connected, data packets will be sent to multiple addresses, causing the thread resources to be fully occupied.
Or, it is also used for mining.

The original intention of opening this port is for pycharm remote debugging.

Different from the general host installation process, only a single system is generally used on the server.
Here we take the super_mircro motherboard x299 as an example when installing the ubuntu20.04 system. a>

1.2 Mirror production

Use balenaEtcher to burn the image, do not use ultraso (optimal pass);

https://etcher.balena.io/

1.2 Monitor connection

What needs to be stated here is that both ends must be VGA interfaces and do not need to be connected.
And some Dell monitors cannot display properly, but I changed to other models of Dell monitors or Aoc monitors, and they can display normally.

When the graphics card driver is not installed, the default display uses the motherboard's integrated display.

If iKVM doesn't support add-on VGA device. Please change the D-SUB connector to Add-on VGA device... appears,

At this time, press and holdDEl the keyboard to enter the bios settings when booting:
In Options-->Advanced, select Onboard VGA; a>

Please add image description
The cpu SLOT7 PCIE and other options in the picture can be found at the locations marked on the card slots on the motherboard.
In the picture, you can see the connection locations of four graphics cards on the motherboard. Among them, SLOT7 PCIE represents the position of the top card slot.

During the process of inserting and removing the graphics card, be sure to要先把显卡槽上卡扣按下去,即按平才可以往上抬起显卡。
Insert image description here

1.3 System installation

After normal display, select the boot disk for system installation:
which is the one in the picture UEFI: AI mass storge ,partition 2
Insert image description here

Then select the first optionUbuntu to install,
where the second optionubuntu (safe graphs) is ubuntu for compatibility. It is prepared for unsupported graphics card types (such as Intel Iris), while ASUS graphics cards are supported by Ubuntu 20.04.

Insert image description here

In addition, during the installation process, if you keep waiting in circles,
it means that Ubuntu is updating online. The method is to disconnect the network and complete the installation.

2. Graphics card driver installation

After the above work is completed, under normal circumstances, it can be displayed normally through vga.
What needs to be stated here is that both ends must be used with VGA interfaces. Do not Transfer,
and some Dell monitors cannot display normally, but when replaced with other Dell monitors or Aoc monitors, they can display normally.

2.1 Copy graphics card driver

After entering the system normally, perform the installation in the following order:

  1. Copy the graphics card driver to the Document file;
  2. Change the Alibaba image source;
  3. Install gcc, make which will be used during the graphics card driver installation process;
  4. disable nouveau;

If someone reverses the order, first disables Nouveau, and then copies the graphics card driver to the system, resulting in the inability to enter the desktop environment.

Then you can use the following method:

  1. Enter the tty character interface;
  2. cat -n uses the line number method to output the file just disabled;
  3. sed -i, comment out the line number just written to disable Nouveau;

2.2 Install graphics card driver

For the subsequent process, you can refer here:

Environment configuration

2.3 Turn off hyperthreading

If you selected the boot time previously, the default is On Board vga, then press and hold DEl when entering bios, it needs to be displayed through VGA, < After a i=3>, find --> in the bottom column, click to enter, and turn off hyper-threading;
超频处理器

Please add image descriptionPlease add image description

3. Configure the deep learning environment

If you have used the following method to configure the deep learning environment corresponding to each project before reinstalling the system,

  • Export libraries that the current environment depends on

Method to export all third-party libraries:
Execute the following statement on the console:pip freeze > requirements.txt (You can choose the name yourself)

  • Install and install all third librariespip install -r requirements.txt

Guess you like

Origin blog.csdn.net/chumingqian/article/details/134671770