Unverified Commit 783c9125 authored by Yifan Xiong's avatar Yifan Xiong Committed by GitHub
Browse files

Docs - Add docs for Docker container and image (#154)

Add docs on:
* Docker image tag list
* Build image and run container instructions
parent d23ad898
......@@ -43,7 +43,7 @@ sb deploy [--docker-image]
| Name | Default | Description |
| --- | --- | --- |
| `--docker-image` `-i` | `superbench/superbench` | Docker image URI. |
| `--docker-image` `-i` | `superbench/superbench` | Docker image URI, [here](./tutorial/container-images) listed all images. |
| `--docker-password` | `None` | Docker registry password if authentication is needed. |
| `--docker-username` | `None` | Docker registry username if authentication is needed. |
| `--host-file` `-f` | `None` | Path to Ansible inventory host file. |
......
......@@ -13,7 +13,7 @@ Follow [System Requirements](../getting-started/installation.md).
## Set Up
```bash
git clone https://github.com/microsoft/superbenchmark
git clone --recurse-submodules -j8 https://github.com/microsoft/superbenchmark
cd superbenchmark
python3 -m pip install -e .[dev,test]
......
---
id: using-docker
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Using Docker
SuperBench runs benchmarks inside Docker container,
here are the guides on how to build images and start containers during development.
## Build image
You need to [clone the code](./development#set-up) first before building the image.
<Tabs
groupId='gpu-platform'
defaultValue='cuda'
values={[
{label: 'CUDA', value: 'cuda'},
{label: 'ROCm', value: 'rocm'},
]
}>
<TabItem value='cuda'>
```bash
export DOCKER_BUILDKIT=1
docker buildx build \
--platform linux/amd64 --cache-to type=inline,mode=max \
--tag superbench-dev --file dockerfile/cuda11.1.1.dockerfile .
```
</TabItem>
<TabItem value='rocm'>
```bash
# coming soon
```
</TabItem>
</Tabs>
## Run container
<Tabs
groupId='gpu-platform'
defaultValue='cuda'
values={[
{label: 'CUDA', value: 'cuda'},
{label: 'ROCm', value: 'rocm'},
]
}>
<TabItem value='cuda'>
```bash
docker run \
-itd --name=sb-dev \
--privileged --net=host --ipc=host \
--gpus=all \
-w /root -v /mnt:/mnt \
superbench-dev bash
```
</TabItem>
<TabItem value='rocm'>
```bash
docker run \
-itd --name=sb-dev \
--privileged --net=host --ipc=host \
--security-opt seccomp=unconfined --group-add video \
-w /root -v /mnt:/mnt \
superbench-dev bash
```
</TabItem>
</Tabs>
---
id: container-images
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Container Images
SuperBench provides a set of OCI-compliant container images,
which are hosted on both [Docker Hub](https://hub.docker.com/r/superbench/superbench/tags)
and [GitHub Container Registry](https://github.com/microsoft/superbenchmark/pkgs/container/superbenchmark%2Fsuperbench).
You can use SuperBench image by `superbench/superbench:${tag}` or `ghcr.io/microsoft/superbenchmark/superbench:${tag}`,
available tags are listed below for all stable versions.
## Stable tagged versions
<Tabs
groupId='gpu-platform'
defaultValue='cuda'
values={[
{label: 'CUDA', value: 'cuda'},
{label: 'ROCm', value: 'rocm'},
]
}>
<TabItem value='cuda'>
| Tag | Description |
| ----------------- | ---------------------------------- |
| v0.2.1-cuda11.1.1 | SuperBench v0.2.1 with CUDA 11.1.1 |
| v0.2.0-cuda11.1.1 | SuperBench v0.2.0 with CUDA 11.1.1 |
</TabItem>
<TabItem value='rocm'>
Coming soon.
</TabItem>
</Tabs>
......@@ -15,6 +15,14 @@ module.exports = {
'getting-started/run-superbench',
],
},
{
type: 'category',
label: 'Tutorial',
collapsed: false,
items: [
'tutorial/container-images',
],
},
{
type: 'category',
label: 'Benchmarks',
......@@ -28,6 +36,7 @@ module.exports = {
label: 'Developer Guides',
items: [
'developer-guides/development',
'developer-guides/using-docker',
'developer-guides/contributing',
],
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment