Skip to content

Commit

Permalink
add NVIDIA_VISIBLE_DEVICES
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandredevely authored May 1, 2024
1 parent 3f1f063 commit e4ad566
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions composer/appli-docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ if [ -x /usr/bin/dbus-launch ]; then
fi
log "end of init"

log "start nvidia settings"
if [ -d /proc/driver/nvidia ]; then
log "/proc/driver/nvidia exists"
if [ -x /usr/bin/nvidia-smi ]; then
log "command line /usr/bin/nvidia-smi found"
# Read the GPU UUID
GPU_UUID=$(nvidia-smi --query-gpu=gpu_uuid --format=csv,noheader)
log "the GPU_UUID is $GPU_UUID"
# Set NVIDIA_VISIBLE_DEVICES
export NVIDIA_VISIBLE_DEVICES=$GPU_UUID
log "NVIDIA_VISIBLE_DEVICES=$NVIDIA_VISIBLE_DEVICES"
fi
fi
echo NVIDIA_VISIBLE_DEVICES=$NVIDIA_VISIBLE_DEVICES
log "end of nvidia settings"

# change current dir to homedir
# to fix ntlm_auth load for firefox on alpine distribution
# firefox does not support SSO, does not execute ntlm_auth if ntlm_auth not in current dir or in $PATH
Expand Down

0 comments on commit e4ad566

Please sign in to comment.