Skip to content

Commit

Permalink
docs: how to enable nvidia gpu 2.0 in Pouch
Browse files Browse the repository at this point in the history
Signed-off-by: codejuan <xh@decbug.com>
  • Loading branch information
CodeJuan committed Nov 6, 2018
1 parent a52c6f3 commit 4215eb2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/features/pouch_with_gpu.md
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
```
Binary file added docs/static_files/pouch_with_gpu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4215eb2

Please sign in to comment.