Skip to content

Commit

Permalink
Fix not having ENV vars defined (#59)
Browse files Browse the repository at this point in the history
* This fixes the following issues:
/opt/r8/monobase/activate.sh: line 71: R8_CUDA_VERSION: unbound variable
* We don’t define these variables so we need to
handle the cases where they aren’t set.
  • Loading branch information
8W9aG authored Jan 13, 2025
1 parent 9d507d1 commit 1840cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/monobase/activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if [ -z "${MONOBASE_GEN_ID:-}" ]; then
fi

MONOBASE_PATH="$MONOBASE_PREFIX/monobase/$(printf 'g%05d' "$MONOBASE_GEN_ID")"
if [ -n "$R8_CUDA_VERSION" ] && [ -n "$R8_CUDNN_VERSION" ]; then
if [ -n "${R8_CUDA_VERSION:-}" ] && [ -n "${R8_CUDNN_VERSION:-}" ]; then
CUDA_PATH="$MONOBASE_PATH/cuda$R8_CUDA_VERSION"
CUDA_MAJOR="$(echo "$R8_CUDA_VERSION" | sed 's/\..\+//')"
CUDA_SUFFIX="$(echo "$R8_CUDA_VERSION" | sed 's/\.//')"
Expand All @@ -95,7 +95,7 @@ else
export PYTHONPATH="$COG_PYTHONPATH:$MONO_PYTHONPATH"
fi

if [ -n "$R8_CUDA_VERSION" ] && [ -n "$R8_CUDNN_VERSION" ]; then
if [ -n "${R8_CUDA_VERSION:-}" ] && [ -n "${R8_CUDNN_VERSION:-}" ]; then
# NVIDIA Container Toolkit mounts drivers here
NCT_PATH=/usr/lib/x86_64-linux-gnu
# NCCL is not part of CUDA or CuDNN and required by vLLM
Expand Down

0 comments on commit 1840cb1

Please sign in to comment.