Forwarding the GPU provides the container with access to the server GPU (host), on which Docker is installed and containers run. Only the NVIDIA GPU forwarding is supported, and the container uses the drivers installed on the host.
To forward the GPU, do the following:
- Make sure that NVIDIA drivers are installed and available:
- If there are no drivers, download and install them from the official NVIDIA website.
- Install the package to support the GPU in the Docker container using the official NVIDIA documentation.
- Restart Docker after you install the package:
sudo systemctl restart docker |
- Start the container using the command:
sudo docker run --gpus all <image_id>/<container_id> |
- To find out the IP address of the running container, execute the command:
sudo docker inspect <container_id> | grep"IPAddress" |
- Run the Axxon One client and connect to the received IP address. At first launch, you must enter the name of the user and the root/root password.
You can add the GPU support to the already created container. To do this, do the following: - Run the container with the --gpus flag.
- Get access to the container terminal.
- Install the missing libraries:
apt update && apt install -y \
cuda-toolkit-12-1 \
libcudnn8 |
|
- Get access to the container terminal using the command:
sudo docker exec -it <container_id> sh |
- Check the GPU availability in the container:
The output must match the results on the host and contain information about available GPUs.
Forwarding the GPU in the Docker container is complete.