From b19c3c13da6506b636bb8a00902a9db6454a7a31 Mon Sep 17 00:00:00 2001 From: Dante Gama Dessavre Date: Mon, 16 Oct 2023 15:52:09 -0400 Subject: [PATCH] FIX conda prefix for all users --- raft-ann-bench/cpu/Dockerfile | 6 ++++-- raft-ann-bench/gpu/Dockerfile | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/raft-ann-bench/cpu/Dockerfile b/raft-ann-bench/cpu/Dockerfile index 5925a936..ab087f93 100644 --- a/raft-ann-bench/cpu/Dockerfile +++ b/raft-ann-bench/cpu/Dockerfile @@ -11,7 +11,9 @@ COPY condarc /opt/conda/.condarc # Create a data folder accessible by any user so mounted volumes under it can be accessible # when the user passes their uid to docker run with -u $(id -u) -RUN mkdir /data && chmod 777 /data +# Also add the conda_prefix config to the global bashrc file so that all users have it correctly configured. +RUN mkdir /data && chmod 777 /data \ + && echo "export CONDA_PREFIX=/opt/conda" >> /etc/bash.bashrc # temporarily downgrade conda from 23.9.0 due to https://github.com/mamba-org/mamba/issues/2882 # after the mamba update step @@ -25,7 +27,7 @@ RUN mamba update --all -y -n base \ RUN useradd -rm -d /home/rapids -s /bin/bash -u 1001 rapids USER rapids -WORKDIR /home/rapids +WORKDIR /data/benchmarks COPY raft-ann-bench/run_benchmark.sh /data/scripts/run_benchmark.sh diff --git a/raft-ann-bench/gpu/Dockerfile b/raft-ann-bench/gpu/Dockerfile index 05f76703..1178cdc5 100644 --- a/raft-ann-bench/gpu/Dockerfile +++ b/raft-ann-bench/gpu/Dockerfile @@ -14,7 +14,9 @@ COPY condarc /opt/conda/.condarc # Create a data folder accessible by any user so mounted volumes under it can be accessible # when the user passes their uid to docker run with -u $(id -u) -RUN mkdir /data && chmod 777 /data +# Also add the conda_prefix config to the global bashrc file so that all users have it correctly configured. +RUN mkdir /data && chmod 777 /data \ + && echo "export CONDA_PREFIX=/opt/conda" >> /etc/bash.bashrc # temporarily downgrade conda from 23.9.0 due to https://github.com/mamba-org/mamba/issues/2882 # after the mamba update step @@ -31,7 +33,7 @@ RUN mamba update --all -y -n base \ # but users are encouraged to use the -u docker run flag to write/read to mounted volumes. RUN useradd -rm -d /home/rapids -s /bin/bash -g conda -u 1001 rapids USER rapids -WORKDIR /home/rapids +WORKDIR /data/benchmarks COPY raft-ann-bench/run_benchmark.sh /data/scripts/run_benchmark.sh