Skip to content

Commit

Permalink
FIX small fixes for cpu dockerfile and better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dantegd committed Sep 28, 2023
1 parent 36b2bf0 commit 9916e62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions raft-ann-bench/cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN chmod g+ws /opt/conda
# Reassign root's primary group to root
RUN usermod -g root root

# 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
RUN useradd -rm -d /home/rapids -s /bin/bash -g conda -u 1001 rapids
USER rapids

Expand Down
7 changes: 6 additions & 1 deletion raft-ann-bench/gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ FROM rapidsai/mambaforge-cuda:cuda${CUDA_VER}-base-${LINUX_VER}-py${PYTHON_VER}
ARG CUDA_VER
ARG RAPIDS_VER

# 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
RUN useradd -rm -d /home/rapids -s /bin/bash -g conda -u 1001 rapids
# rapids is the default user, but users can use the -u docker run flag to write/read to mounted volumes.
Expand All @@ -26,9 +28,12 @@ RUN mamba update --all -y -n base \
"rmm=${RAPIDS_VER}.*" \
&& conda clean -afy

# we need to change the permissions of the conda folder so that all users can execute
# Change the permissions of the conda folder so that all users can execute,
# particularly the user passed by -u $(id -u)
USER root
RUN chmod -R 777 /opt/conda

# switch back to rapids user by default
USER rapids

COPY raft-ann-bench/run_benchmark.sh /data/scripts/run_benchmark.sh
Expand Down

0 comments on commit 9916e62

Please sign in to comment.