Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def read_version():
"scipy>=0.19.0",
"urllib3>=1.21, <1.25",
"protobuf3-to-dict>=0.1.5",
"docker-compose>=1.23.0",
"requests>=2.20.0, <2.21",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also remove this restriction now? 😄 (and maybe also urllib3?)

"fabric>=2.0",
]
Expand Down Expand Up @@ -87,6 +86,7 @@ def read_version():
"black==19.3b0 ; python_version >= '3.6'",
"stopit==1.1.2",
"apache-airflow==1.10.5",
"docker-compose>=1.23.0",
]
},
entry_points={"console_scripts": ["sagemaker=sagemaker.cli.main:main"]},
Expand Down
10 changes: 10 additions & 0 deletions src/sagemaker/local/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import tarfile
import tempfile

from distutils.spawn import find_executable
from threading import Thread
from six.moves.urllib.parse import urlparse

Expand Down Expand Up @@ -77,6 +78,15 @@ def __init__(self, instance_type, instance_count, image, sagemaker_session=None)
"""
from sagemaker.local.local_session import LocalSession

# check if docker-compose is installed
if find_executable("docker-compose") is None:
raise ImportError(
"'docker-compose' is not installed. "
"Local Mode features will not work without docker-compose. "
"For more information on how to install 'docker-compose', please, see "
"https://docs.docker.com/compose/install/"
)

self.sagemaker_session = sagemaker_session or LocalSession()
self.instance_type = instance_type
self.instance_count = instance_count
Expand Down