Skip to content

Commit

Permalink
FIX conda prefix for all users
Browse files Browse the repository at this point in the history
  • Loading branch information
dantegd committed Oct 16, 2023
1 parent f079e00 commit b19c3c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions raft-ann-bench/cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
6 changes: 4 additions & 2 deletions raft-ann-bench/gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit b19c3c1

Please sign in to comment.