Skip to content

Commit 6bf4402

Browse files
committed
bug: local_gpu gives error Unknown runtime specified nvidia
1 parent 5b887e7 commit 6bf4402

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/sagemaker/local/image.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,6 @@ def _create_docker_host(self, host, environment, optml_subdirs, command, volumes
746746
"volumes": [v.map for v in optml_volumes],
747747
"environment": environment,
748748
"networks": {"sagemaker-local": {"aliases": [host]}},
749-
"deploy": {"resources": {"reservations": {"devices": [{"capabilities": ["gpu"]}]}}},
750749
}
751750

752751
if command != "process":
@@ -760,7 +759,7 @@ def _create_docker_host(self, host, environment, optml_subdirs, command, volumes
760759
# for GPU support pass in nvidia as the runtime, this is equivalent
761760
# to setting --runtime=nvidia in the docker commandline.
762761
if self.instance_type == "local_gpu":
763-
host_config["runtime"] = "nvidia"
762+
host_config["deploy"] = {"resources": {"reservations": {"devices": [{"capabilities": ["gpu"]}]}}}
764763

765764
if command == "serve":
766765
serving_port = (

0 commit comments

Comments
 (0)