From b6bc2df5e0c297e127f355c00be048c1ccff0d68 Mon Sep 17 00:00:00 2001 From: David Jurado Date: Tue, 12 Dec 2023 10:09:15 -0500 Subject: [PATCH] Fix bug when using int value --- runners/mlcube_docker/mlcube_docker/docker_run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runners/mlcube_docker/mlcube_docker/docker_run.py b/runners/mlcube_docker/mlcube_docker/docker_run.py index b3b021f0..c6df84dd 100644 --- a/runners/mlcube_docker/mlcube_docker/docker_run.py +++ b/runners/mlcube_docker/mlcube_docker/docker_run.py @@ -276,8 +276,8 @@ def run(self) -> None: else: cuda_visible_devices = num_gpus - if cuda_visible_devices.isnumeric(): - cuda_visible_devices = str(list(range(cuda_visible_devices))) + if str(cuda_visible_devices).isnumeric(): + cuda_visible_devices = str(list(range(int(cuda_visible_devices)))) cuda_visible_devices = cuda_visible_devices.replace(" ", "")[1:-1] run_args += f" --env CUDA_VISIBLE_DEVICES={cuda_visible_devices}"