Skip to content

Commit

Permalink
Updating raft-ann-bench docker commands
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed Oct 13, 2023
1 parent baad384 commit 0c7d64b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/source/raft_ann_benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ We provide images for GPU enabled systems, as well as systems without a GPU. The
- `raft-ann-bench-datasets`: Contains the GPU and CPU benchmarks with million-scale datasets already included in the container. Best suited for users that want to run multiple million scale datasets already included in the image.
- `raft-ann-bench-cpu`: Contains only CPU benchmarks with minimal size. Best suited for users that want the smallest containers to reproduce benchmarks on systems without a GPU.

Nightly images are located in [dockerhub](https://hub.docker.com/r/rapidsai/raft-ann-bench), meanwhile release (stable) versions are located in [NGC](https://hub.docker.com/r/rapidsai/raft-ann-bench), starting with release 23.10.
Nightly images are located in [dockerhub](https://hub.docker.com/r/rapidsai/raft-ann-bench/tags), meanwhile release (stable) versions are located in [NGC](https://hub.docker.com/r/rapidsai/raft-ann-bench), starting with release 23.12.

- The following command pulls the nightly container for python version 10, cuda version 12, and RAFT version 23.10:

```bash
docker pull rapidsai/raft-ann-bench:23.10a-cuda12.0-py3.10 #substitute raft-ann-bench for the exact desired container.
docker pull rapidsai/raft-ann-bench:23.12a-cuda12.0-py3.10 #substitute raft-ann-bench for the exact desired container.
```

The CUDA and python versions can be changed for the supported values:
Expand All @@ -113,7 +113,7 @@ You can see the exact versions as well in the dockerhub site:
- The following command (only available after RAPIDS 23.10 release) pulls the container:

```bash
docker pull nvcr.io/nvidia/rapidsai/raft-ann-bench:23.08-cuda11.8-py3.10 #substitute raft-ann-bench for the exact desired container.
docker pull nvcr.io/nvidia/rapidsai/raft-ann-bench:23.12-cuda11.8-py3.10 #substitute raft-ann-bench for the exact desired container.
```

### Container Usage
Expand All @@ -127,8 +127,8 @@ For GPU systems, where `$DATA_FOLDER` is a local folder where you want datasets
```bash
export DATA_FOLDER=path/to/store/datasets/and/results
docker run --gpus all --rm -it -u $(id -u) \
-v $DATA_FOLDER:/home/rapids/benchmarks \
rapidsai/raft-ann-bench:23.10a-cuda11.8-py3.10 \
-v $DATA_FOLDER:/data/benchmarks/datasets/ \
rapidsai/raft-ann-bench:23.12a-cuda11.8-py3.10 \
"--dataset deep-image-96-angular" \
"--normalize" \
"--algorithms raft_cagra,raft_ivf_pq" \
Expand All @@ -140,8 +140,8 @@ Where:
```bash
export DATA_FOLDER=path/to/store/datasets/and/results # <- local folder to store datasets and results
docker run --gpus all --rm -it -u $(id -u) \
-v $DATA_FOLDER:/home/rapids/benchmarks \
rapidsai/raft-ann-bench:23.10a-cuda11.8-py3.10 \ # <- image to use, either `raft-ann-bench` or `raft-ann-bench-datasets`, can choose RAPIDS, cuda and python versions.
-v $DATA_FOLDER:/data/benchmarks/ \
rapidsai/raft-ann-bench:23.12a-cuda11.8-py3.10 \ # <- image to use, either `raft-ann-bench` or `raft-ann-bench-datasets`, can choose RAPIDS, cuda and python versions.
"--dataset deep-image-96-angular" \ # <- dataset name
"--normalize" \ # <- whether to normalize the dataset, leave string empty ("") to not normalize.
"--algorithms raft_cagra" \ # <- what algorithm(s) to use as a ; separated list, as well as any other argument to pass to `raft_ann_benchmarks.run`
Expand All @@ -154,12 +154,11 @@ For CPU systems the same interface applies, except for not needing the gpus argu
```bash
export DATA_FOLDER=path/to/store/datasets/and/results
docker run all --rm -it -u $(id -u) \
-v $DATA_FOLDER:/home/rapids/benchmarks \
rapidsai/raft-ann-bench-cpu:23.10a-py3.10 \
-v $DATA_FOLDER:/data/benchmarks/ \
rapidsai/raft-ann-bench-cpu:23.12a-py3.10 \
"--dataset deep-image-96-angular" \
"--normalize" \
"--algorithms raft_cagra" \
""
"--algorithms raft_cagra"
```

**Note:** The user inside the containers is `root`. To workaround this, the scripts in the containers fix the user of the output files after the benchmarks are run. If the benchmarks are interrupted, the owner of the `datasets/results` produced by the container will be wrong, and will need to be manually fixed by the user.
Expand All @@ -169,9 +168,10 @@ docker run all --rm -it -u $(id -u) \
```bash
export DATA_FOLDER=path/to/store/datasets/and/results
docker run --gpus all --rm -it -u $(id -u) \
-v $DATA_FOLDER:/home/rapids/benchmarks \
rapidsai/raft-ann-bench:23.10a-cuda11.8-py3.10 \
--entrypoint /bin/bash
--entrypoint /bin/bash \
--workdir /data/benchmarks \
-v $DATA_FOLDER:/data/benchmarks \
rapidsai/raft-ann-bench:23.12a-cuda11.8-py3.10
```

This will drop you into a command line in the container, with the `raft_ann_benchmarks` python package ready to use, as was described in the prior [conda section](#conda):
Expand Down

0 comments on commit 0c7d64b

Please sign in to comment.