Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bradley Dice <[email protected]>
  • Loading branch information
dantegd and bdice authored Oct 18, 2024
1 parent 911c31e commit 53bee9b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-test-publish-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,20 @@ jobs:
base_repo="base"
notebooks_repo="notebooks"
cuvs_bench_repo="cuvs-bench"
CUVS_bench_datasets_repo="cuvs-bench-datasets"
CUVS_bench_cpu_repo="cuvs-bench-cpu"
cuvs_bench_datasets_repo="cuvs-bench-datasets"
cuvs_bench_cpu_repo="cuvs-bench-cpu"
if [ "${{ inputs.build_type }}" = "pull-request" ]; then
base_repo="staging"
notebooks_repo="staging"
CUVS_bench_repo="staging"
CUVS_bench_datasets_repo="staging"
CUVS_bench_cpu_repo="staging"
cuvs_bench_datasets_repo="staging"
cuvs_bench_cpu_repo="staging"
fi
echo "BASE_IMAGE_REPO=${base_repo}" | tee -a ${GITHUB_OUTPUT}
echo "NOTEBOOKS_IMAGE_REPO=${notebooks_repo}" | tee -a ${GITHUB_OUTPUT}
echo "CUVS_BENCH_IMAGE_REPO=${CUVS_bench_repo}" | tee -a ${GITHUB_OUTPUT}
echo "CUVS_BENCH_DATASETS_IMAGE_REPO=${CUVS_bench_datasets_repo}" | tee -a ${GITHUB_OUTPUT}
echo "CUVS_BENCH_CPU_IMAGE_REPO=${CUVS_bench_cpu_repo}" | tee -a ${GITHUB_OUTPUT}
echo "CUVS_BENCH_IMAGE_REPO=${cuvs_bench_repo}" | tee -a ${GITHUB_OUTPUT}
echo "CUVS_BENCH_DATASETS_IMAGE_REPO=${cuvs_bench_datasets_repo}" | tee -a ${GITHUB_OUTPUT}
echo "CUVS_BENCH_CPU_IMAGE_REPO=${cuvs_bench_cpu_repo}" | tee -a ${GITHUB_OUTPUT}
- name: Compute RAPIDS_VER
id: compute-rapids-ver
run: |
Expand Down
12 changes: 6 additions & 6 deletions cuvs-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For GPU systems, where $DATA_FOLDER is a local folder where you want datasets st
```bash
export DATA_FOLDER=path/to/store/results/and/data
docker run --gpus all --rm -it \
-v $DATA_FOLDER:/home/rapids/benchmarks \
-v $DATA_FOLDER:/home/rapids/benchmarks \
-u $(id -u) \
rapidsai/cuvs-bench:24.12a-cuda12.5-py3.12 \
"--dataset deep-image-96-angular" \
Expand All @@ -48,7 +48,7 @@ Where:
```bash
export DATA_FOLDER=path/to/store/results/and/data # <- Results and datasets will be written to this host folder.
docker run --gpus all --rm -it \
-v $DATA_FOLDER:/home/rapids/benchmarks \ # <- local folder to store datasets and results
-v $DATA_FOLDER:/home/rapids/benchmarks \ # <- local folder to store datasets and results
-u $(id -u) \ # <- this flag allows the container to use the host user for permissions
rapidsai/cuvs-bench:24.12a-cuda12.5-py3.12 \ # <- image to use, either `cuvs-bench` or `cuvs-bench-datasets`
"--dataset deep-image-96-angular" \ # <- dataset name
Expand All @@ -61,8 +61,8 @@ For CPU systems the same interface applies, except for not needing the gpus argu
```bash
export DATA_FOLDER=path/to/store/results/and/data
docker run all --rm -it \
-v $DATA_FOLDER:/home/rapids/benchmarks \
-u $(id -u) \ # <- this flag allows the container to use the host user for permissions
-v $DATA_FOLDER:/home/rapids/benchmarks \
-u $(id -u) \
rapidsai/cuvs-bench-cpu:24.12a-py3.12 \
"--dataset deep-image-96-angular" \
"--normalize" \
Expand All @@ -75,7 +75,7 @@ docker run all --rm -it \
```bash
export DATA_FOLDER=path/to/store/results/and/data
docker run --gpus all --rm -it \
-v $DATA_FOLDER:/home/rapids/benchmarks \
-v $DATA_FOLDER:/home/rapids/benchmarks \
-u $(id -u) \
rapidsai/cuvs-bench:24.12a-cuda12.5-py3.12 \
--entrypoint /bin/bash
Expand All @@ -87,4 +87,4 @@ This will drop you into a command line in the container, with cuVS and the `cuvs
(base) root@00b068fbb862:/home/rapids#
```

Additionally, the containers could be run in dettached form without any issue.
Additionally, the containers could be run in detached form without any issue.
6 changes: 3 additions & 3 deletions cuvs-bench/cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mamba update --all -y -n base
mamba install -y -n base "python=${PYTHON_VER}"
mamba update --all -y -n base
mamba install -y -n base \
"cuvs_bench_cpu=${RAPIDS_VER}.*" \
"cuvs-bench-cpu=${RAPIDS_VER}.*" \
"python=${PYTHON_VER}"
conda clean -afy
chmod -R 777 /opt/conda
Expand All @@ -52,11 +52,11 @@ FROM bench-base AS cuvs-bench-cpu-datasets

SHELL ["/bin/bash", "-euo", "pipefail", "-c"]

COPY cuvs-bench/get_datasets.sh /home/rapids/cuvsbench/get_datasets.sh
COPY cuvs-bench/get_datasets.sh /home/rapids/cuvs-bench/get_datasets.sh

COPY cuvs-bench/run_benchmark.sh /data/scripts/run_benchmark_preloaded_datasets.sh

RUN /home/rapids/cuvsbench/get_datasets.sh
RUN /home/rapids/cuvs-bench/get_datasets.sh

CMD ["--dataset fashion-mnist-784-euclidean", "", "--algorithms hnswlib"]

Expand Down
6 changes: 3 additions & 3 deletions cuvs-bench/gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN apt-get install perl -y
RUN <<EOF
mamba update --all -y -n base
mamba install -y -n base \
"cuvs_bench=${RAPIDS_VER}.*" \
"cuvs-bench=${RAPIDS_VER}.*" \
"cuda-version=${CUDA_VER%.*}.*"
conda clean -afy
chmod -R 777 /opt/conda
Expand All @@ -52,11 +52,11 @@ FROM cuvs-bench AS cuvs-bench-datasets

SHELL ["/bin/bash", "-euo", "pipefail", "-c"]

COPY cuvs-bench/get_datasets.sh /home/rapids/cuvsbench/get_datasets.sh
COPY cuvs-bench/get_datasets.sh /home/rapids/cuvs-bench/get_datasets.sh

COPY cuvs-bench/run_benchmarks_preloaded_datasets.sh /data/scripts/run_benchmarks_preloaded_datasets.sh

RUN /home/rapids/cuvsbench/get_datasets.sh
RUN /home/rapids/cuvs-bench/get_datasets.sh

CMD ["--dataset fashion-mnist-784-euclidean", "", "--algorithms hnswlib", ""]

Expand Down

0 comments on commit 53bee9b

Please sign in to comment.