-
Notifications
You must be signed in to change notification settings - Fork 950
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: how to enable nvidia gpu 2.0 in Pouch
Signed-off-by: codejuan <xh@decbug.com>
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# PouchContainer with GPU | ||
|
||
## nvidia gpu runtime | ||
|
||
![pouch_with_pouch](../static_files/pouch_with_gpu.png) | ||
|
||
The figure shows how the libnvidia-container integrates into Pouch, specifically at the runc layer. We use a custom OCI prestart hook called nvidia-container-runtime-hook to runc in order to enable GPU containers. | ||
|
||
## Prerequisites Installation | ||
|
||
Make sure you have installed the NVIDIA driver | ||
|
||
1. GNU/Linux x86_64 with kernel version > 3.10 | ||
2. NVIDIA GPU with Architecture > Fermi (2.1) | ||
3. NVIDIA drivers ~= 361.93 (untested on older versions) | ||
|
||
## Start GPU container | ||
|
||
Pouch support 2 method to start GPU container | ||
|
||
1. Via nvidia config API, [nvidiaconfig](https://github.com/alibaba/pouch/blob/master/docs/api/HTTP_API.md#nvidiaconfig) | ||
2. Via Environment, [nvidia-container-runtime-env](https://github.com/NVIDIA/nvidia-container-runtime#environment-variables-oci-spec) | ||
|
||
### Via API | ||
|
||
```shell | ||
pouch run -d --nvidia-capabilities=all --nvidia-visible-devs=all centos:7 bash | ||
``` | ||
|
||
### Via Environment | ||
|
||
The NVIDIA Container Runtime uses environment variables in container images to specify a GPU accelerated container. | ||
|
||
```shell | ||
pouch run -it -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all centos:7 bash | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.