Questions about

Deplay PrivateCloud on Unbuntu

Private cloud installation and deployment operation document

For Ubuntu
1. Install ubuntu20.04 or ubuntu18.04(20.04 Recommand)
2. Install the Nvidia graphics driver

2.1 If you are using Ubuntu 20.04, you can try this:

2.1.1 Check the graphics card driver

Enter the following command in the terminal:

nvidia-smi

If your graphics driver is not installed correctly, you will get an error message like the one shown in Figure x(there may be other error messages as well).

2.1.2 Updating packages

Enter the following command in the terminal to update the packages.

sudo apt-get update

2.1.3 Open the "Software & Updates" and select the corresponding driver

Go to show applications in the bottom left corner and find the Software & Updates application.

Click the Additional driver and click the driver suitable for your graphics card in the list (for example, our computer uses RTX3050, so we choose 535 driver). Then click Apply changes

2.1.4 Restart your computer after installation

Enter the following command in the terminal to restart your computer when you finished your installation.

sudo reboot

2.1.5 Checking the installation results

Enter the following command in the terminal to check the installation.

nvidia-smi

If the following result is displayed, the installation is successful.

2.2 If you are using Ubuntu18.04, you can try this:

2.2.1 Update software list and install the dependencies

Enter the following command in the terminal:

sudo apt-get update
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make

2.2.2 View the graphics card model

lspci | grep -i nvidia

2.2.3 Download the driver of the corresponding model from the official website

Nvidia website: https://www.nvidia.com/

2.2.4 Unmount the original driver

sudo apt-get remove --purge nvidia*    # or nvidia-*

2.2.5 Disable nouveau (Must Be Done!)

sudo gedit /etc/modprobe.d/blacklist.conf # or blacklist-nouveau.conf

2.2.6 Add the following statement to the end of the blacklist.conf file and save it.

blacklist nouveau
options nouveau modeset=0

2.2.7 Enter following command to update initramfs.

sudo update-initramfs –u

2.2.8 Enter the following command in the terminal to restart the computer after the update is finished (Must be done!)

reboot

2.2.9 After the restart, run the following command on the terminal. If nothing is displayed, the original driver is successfully uninstalled and nouveau is masked.

lsmod | grep nouveau

2.2.10 Install lightdm

sudo apt-get install lightdm

2.2.11 In order to install the new Nvidia driver, we need to stop the current graphical server. Enter the following command to stop the Graphical Service.

sudo telinit 3

2.2.12 After exiting the graphical interface, the text interface will be entered automatically. If you cannot enter the text interface, hold down the ctrl+Alt+F1~F6 combination key.

If you want to exit the text interface to a graphical interface, type sudo telinit 5 or press Ctrl + Alt + F1/F7/F8.

2.2.13 In the text interface, enter the following command in the terminal to disable the X-windows service.

sudo /etc/init.d/lightdm stop   #or: sudo service lightdm stop

2.2.14 Navigate to the directory where you downloaded the nvidia driver earlier and enter the following command to give it executable permissions.

sudo chmod 777 NVIDIA-Linux-x86_64-430.26.run

2.2.15 Run the install command

sudo ./NVIDIA-Linux-x86_64-430.26.run (–no-opengl-files)

2.2.16 Restart the lightdm service

sudo service lightdm start

  • If that doesn't work, type reboot to restart your computer.
  • If there are still problems, make sure that you turn off the secure boot in the Bios interface. (secure boot: disable)

2.2.17 Once back in the GUI, type "nvidia-smi" in the terminal to check the driver installation

nvidia-smi

Please install the nvidia graphics driver yourself, and finally run the command `"nvidia-smi"` to check whether the installation is successful. <-->

3. Install docker24.0.2

3.1 Update apt package manager

sudo apt update

3.2 Install the basic package to use apt to connect to the repository over HTTPS

sudo apt install apt-transport-https ca-certificates curl software-properties-common

3.3 Add Docker's official GPG key and set up the repository

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

3.4 Re-update apt package manager

sudo apt update

3.5 Install Docker CE from the Docker repository

sudo apt install docker-ce

3.6 Verify that Docker was installed successfully

docker --version

4. Install Nvidia-Container-Runtime (to using GPU in docker)

4.1 Configure the nvidia source

curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update

4.2 Install nvidia-container-runtime

4.2.1 Install nvidia-container-runtime

sudo apt-get install nvidia-container-runtime

4.2.2 Stop docker process

systemctl stop docker

4.2.3 Add the runtime to docker

dockerd --add-runtime=nvidia=/usr/bin/nvidia-container-runtime
5. Get license

There are two types of licenses: soft encryption and hard dongle. You can find them in:

How To Get Private Cloud License

6. Install a private cloud image

6.1 Copy the license image privateCloud.tar to any directory, We take /home/images as an example

6.2 Start docker

systemctl start docker

6.3 Load image

cd /home/LICENCE
docker load -i privateCloud.tar(The name of your private cloud file)

6.4 View image + change tag

docker images

Initially empty , to distinguish the mirror, modify the corresponding content

For example, rename the image with imageId of 25543b0d2ee2 to privateCloud with tag of v2

sudo docker tag 25543b0d2ee2 privatecloud11:v2

6.5 Create a container

Take neuro_private_cu11 as the container name for example

sudo docker run -idt --privileged=true -v /etc:/home/license --restart=always --gpus all --ipc=host  -p 30022:22 -p 33306:3306 -p 38080:8080 --name neuro_private_cu11 privatecloud11:v0731 /home/start.sh

Once the container is created, it will run continuously in the background of the host machine, shutting it down and restarting it without restarting it. To turn off the mirroring service, run:

sudo docker stop neuro_private_cu11(the name of your project)

if you want tu restart:

sudo docker start neuro_private_cu11

7. Access the private cloud with a client

7.1 Obtain the Ubuntu ip address of the private cloud server. We take 192.168.22.111 as an example.

sudo apt update
sudo apt-get install net-tools
ifconfig
Then you can get ip address

As shown below, the local LAN ip address is found after the last line inet: 192.168.22.78

7.2 Client configuration host file

Enter the address in the windows folder to find the host file: C:\Windows\System32\drivers\etc\hosts

Add two lines to your hosts file:

192.168.22.78 storage.nb-ai.com
192.168.22.78 private.nb-ai.com

Run this command in cmd:

ipconfig/flushdns

7.3 Use the client to access the private cloud

Enter the following address on the web page for immediate access:

private.nb-ai.com:38080

Still have a question?

Each section should be concise, user-friendly, and direct users to additional resources or documentation when necessary.