ehfd 4 éve
szülő
commit
ef0d0e1796
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      bootstrap.sh

+ 2 - 2
bootstrap.sh

@@ -7,9 +7,9 @@ echo "user:$VNCPASS" | sudo chpasswd
 
 # NVIDIA driver version inside the container from Dockerfile must be equal to the host
 HEX_ID=$(sudo nvidia-smi --query-gpu=pci.bus_id --id="$(echo "$NVIDIA_VISIBLE_DEVICES" | cut -d ',' -f1)" --format=csv | sed -n 2p)
-IFS=":." ARR_ID=("$HEX_ID")
+IFS=":." ARR_ID=($HEX_ID)
 unset IFS
-BUS_ID=PCI:$((16#${ARR_ID[1]})):$((16#${ARR_ID[2]})):$((16#${ARR_ID[3]}))
+BUS_ID=$((16#${ARR_ID[1]})):$((16#${ARR_ID[2]})):$((16#${ARR_ID[3]}))
 # Leave out --use-display-device=None if GPU is headless such as Tesla, and download links of such GPU drivers in Dockerfile should also be changed
 sudo nvidia-xconfig --virtual="${SIZEW}x${SIZEH}" --allow-empty-initial-configuration --enable-all-gpus --no-use-edid-dpi --busid="$BUS_ID" --use-display-device=None