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}"