I got the HP Z2 Mini G4, so a memo when I set it up
Machine: HP Z2 Mini G4 Workstation CPU: Intel(R) Xeon(R) E-2224G CPU @ 3.50GHz RAM: 32GB GPU: NVIDIA Quadro P600 GPU: Intel® HD Graphics P630 (with built-in CPU) OS is:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
After all, I installed the latest version of Ubuntu 20.04.1 LTS. Next, I installed openssh-server and openssh-client. You can't install it unless you upgrade it before this installation, I always think that you have the latest version.
$ sudo apt update
$ sudu apt upgrade -y
$ sudo install openssh-server
$ sudo install openssh-client
$ sudo systemctl enable sshd
$ sudo systemctl start sshd
From here on, work with ssh from your Mac.
NVIDIA Driver install https://github.com/NVIDIA/nvidia-docker
$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001CBCsv0000103Csd00008458bc03sc00i00
vendor : NVIDIA Corporation
model : GP107GLM [Quadro P600 Mobile]
driver : nvidia-driver-435 - distro non-free
driver : nvidia-driver-440 - distro non-free recommended
driver : nvidia-driver-390 - distro non-free
driver : nvidia-driver-440-server - distro non-free
driver : nvidia-driver-418-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
sudo ubuntu-drivers autoinstall
These days it's just a convenient way to install cuda
$ sudo apt install nvidia-driver-440
$ nvidia-smi
Sat Aug 29 16:47:10 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro P600 Off | 00000000:01:00.0 Off | N/A |
| N/A 54C P0 N/A / N/A | 0MiB / 4032MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$ sudo reboot
Docker install & nvidia docke install This is something that has become very easy these days. See the https://github.com/NVIDIA/nvidia-docker page. The installation conditions are
The procedure is: Install Docker 19.3, then install nvidia-docker-toolkit
# uninstall old version
$ sudo apt-get remove docker docker-engine docker.io containerd runc
# install use repository
$ sudo apt-get update
$ sudo apt install curl
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Verify
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
$ docker --version
Docker version 19.03.12, build 48a66213fe
# docker Compose install
# Run this command to download the current stable release of Docker Compose:
#Download the current stable release of Docker Compose by running the following command:
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
#Give execute right
$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose --version
docker-compose version 1.26.2, build eefe0d31
# Add the package repositories
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
# test
$ sudo docker run --gpus all nvidia/cuda:10.0-base nvidia-smi
# docker run --gpus all -it --rm -v local_dir:container_dir nvcr.io/nvidia/pytorch:xx.xx-py3
$ docker run --gpus all -it --rm -v local_dir:container_dir nvcr.io/nvidia/pytorch:20.08-py3
$ nvidia-container-cli info
NVRM version: 440.100
CUDA version: 10.2
Device Index: 0
Device Minor: 0
Model: Quadro P600
Brand: Quadro
GPU UUID: GPU-55463dd1-1880-c457-390a-29cd30b1fc80
Bus Location: 00000000:01:00.0
Architecture: 6.1
For Python, 3.8.3 was included, but pip was not included, so install pip3. I tried to put jupyter with pip, but it is useless, so install it with apt
$ python3 --version
Python 3.8.2
$ sudo apt install python3-pip
$ pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ pip3 list
Package Version
apturl 0.5.2
bcrypt 3.1.7
blinker 1.4
...
wheel 0.34.2
xkit 0.0.0
# jupyter install
$ sudo apt install jupyter-core
$ sudo apt install jupyter-notebook
$ sudo apt install ipython3
~$ ipython3
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:<Hash value>'
In [3]: exit
I haven't tried it, but I always did it after installing ipython, but it seems that jupyter can also do it. According to the manual, https://jupyter-notebook.readthedocs.io/en/stable/public_server.html Read Running a notebook server
$ mkdir ~/.jupyter
$ vi ~/.jupyter/jupyter_notebook_config.py
c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 9999
c.NotebookApp.password = u'sha1:<Hash value>'
c.NotebookApp.ip = is a subnet mask specification c.NotebookApp.port = Access port c.NotebookApp.password = Please enter the issued password hash
Note: sudo apt-get purge nvidia- *
Recommended Posts