Skip to content

Commit cf770dd

Browse files
authored
Merge branch 'master' into fix/sagemaker-session-region-not-being-used
2 parents 5b0ce21 + 790bd87 commit cf770dd

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/sagemaker/local/image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,9 @@ 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": {"devices": [{"count": "all", "capabilities": ["gpu"]}]}
865+
}
864866
}
865867

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

tests/unit/sagemaker/local/test_local_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ def test_container_has_gpu_support(tmpdir, sagemaker_session):
871871
docker_host = sagemaker_container._create_docker_host("host-1", {}, set(), "train", [])
872872
assert "deploy" in docker_host
873873
assert docker_host["deploy"] == {
874-
"resources": {"reservations": {"devices": [{"capabilities": ["gpu"]}]}}
874+
"resources": {"reservations": {"devices": [{"count": "all", "capabilities": ["gpu"]}]}}
875875
}
876876

877877

tox.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = black-format,flake8,pylint,docstyle,sphinx,doc8,twine,py38,py39,py310
7+
envlist = black-format,flake8,pylint,docstyle,sphinx,doc8,twine,py38,py39,py310,py311
88

99
skip_missing_interpreters = False
1010

@@ -84,12 +84,13 @@ commands =
8484
pip install 'apache-airflow==2.8.2' --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.2/constraints-3.8.txt"
8585
pip install 'torch==2.0.1+cpu' -f 'https://download.pytorch.org/whl/torch_stable.html'
8686
pip install 'torchvision==0.15.2+cpu' -f 'https://download.pytorch.org/whl/torch_stable.html'
87+
pip install 'dill>=0.3.8'
8788

8889
pytest --cov=sagemaker --cov-append {posargs}
89-
{env:IGNORE_COVERAGE:} coverage report -i --fail-under=86
90+
{env:IGNORE_COVERAGE:} coverage report -i --fail-under=86
9091
deps = .[test]
9192
depends =
92-
{py38,py39,py310}: clean
93+
{py38,py39,py310,p311}: clean
9394

9495
[testenv:flake8]
9596
skipdist = true

0 commit comments

Comments
 (0)