Skip to content

Commit d526285

Browse files
gverkesakrishna1995
authored andcommitted
fix: make sure gpus are found in local_gpu run
1 parent 36138da commit d526285

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/sagemaker/local/image.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,13 @@ def _create_docker_host(
860860
# to setting --runtime=nvidia in the docker commandline.
861861
if self.instance_type == "local_gpu":
862862
host_config["deploy"] = {
863-
"resources": {"reservations": {"devices": [{"capabilities": ["gpu"]}]}}
863+
"resources": {
864+
"reservations": {
865+
"devices": [
866+
{"count": "all", "capabilities": ["gpu"]}
867+
]
868+
}
869+
}
864870
}
865871

866872
if not self.is_studio and command == "serve":

0 commit comments

Comments
 (0)