Skip to content

Commit

Permalink
Use pre-defined .bazelrc.user to save hermetic CUDA settings
Browse files Browse the repository at this point in the history
  • Loading branch information
gpupuck authored Oct 21, 2024
1 parent cfc3f74 commit 6c5276a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/container/build-jax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,7 @@ if [[ ! -e "/usr/local/cuda/lib" ]]; then
ln -s /usr/local/cuda/lib64 /usr/local/cuda/lib
fi

if ! grep 'try-import %workspace%/.local_cuda.bazelrc' "${SRC_PATH_JAX}/.bazelrc"; then
echo 'try-import %workspace%/.local_cuda.bazelrc' >> "${SRC_PATH_JAX}/.bazelrc"
fi
cat > "${SRC_PATH_JAX}/.local_cuda.bazelrc" << EOF
cat > "${SRC_PATH_JAX}/.bazelrc.user" << EOF
build:cuda --repo_env=LOCAL_CUDA_PATH="/usr/local/cuda"
build:cuda --repo_env=LOCAL_CUDNN_PATH="/opt/nvidia/cudnn"
build:cuda --repo_env=LOCAL_NCCL_PATH="/opt/nvidia/nccl"
Expand Down

0 comments on commit 6c5276a

Please sign in to comment.