Skip to content

Commit

Permalink
build gpu docker image on linux if nvidia-smi exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpetrovic committed Jan 22, 2024
1 parent b653d89 commit 20336e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/k3d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ k3d_up() {
os_type="$(uname)"
case "$os_type" in
Linux*)
check_gpu_linux && extra_args="--gpus=all --image=localhost:5001/rancher/k3s:latest" || extra_args=""
docker build . -f ./docker/Dockerfile.k3d -t localhost:5001/rancher/k3s:latest
if check_gpu_linux; do
extra_args="--gpus=all --image=localhost:5001/rancher/k3s:latest"
docker build . -f ./docker/Dockerfile.k3d -t localhost:5001/rancher/k3s:latest
elif
extra_args=""
fi
;;
Darwin*)
extra_args=""
Expand Down

0 comments on commit 20336e3

Please sign in to comment.