From 6c5276ab920b2136410b136f7cc03a4a2c5fe420 Mon Sep 17 00:00:00 2001 From: Brian Yang <125406446+gpupuck@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:16:32 -0700 Subject: [PATCH] Use pre-defined .bazelrc.user to save hermetic CUDA settings --- .github/container/build-jax.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/container/build-jax.sh b/.github/container/build-jax.sh index 8ff65ca99..bda38d2a3 100755 --- a/.github/container/build-jax.sh +++ b/.github/container/build-jax.sh @@ -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"