Sagemaker-python-sdk: Installing Dependencies

Created on 21 Jan 2018  路  5Comments  路  Source: aws/sagemaker-python-sdk

Hi! I am using Deep Mind's Sonnet library to make my architecture code reusable. Sonnet is not included in the py2 container and I have not found a way to pass additional requirements to SageMaker. Could you implement a way to pass a requirements.txt file to the Tensorflow constructor so SageMaker installs the requirements in the Docker container before training? Floydhub lets you define the floyd_requirements.txt file that does exactly this and works very well.

Most helpful comment

Excellent! Looking forward to it.

For anyone interested, I've resorted to installing dependencies from python, just add these lines before all other imports:

from subprocess import call
call("pip install dm-sonnet".split(" "))

All 5 comments

Hi,

Thanks for the feature suggestion! This is something I've previously thought would be really cool and it would be great to get this into our SDK. We'll post here when the feature is released.

Excellent! Looking forward to it.

For anyone interested, I've resorted to installing dependencies from python, just add these lines before all other imports:

from subprocess import call
call("pip install dm-sonnet".split(" "))

This feature has been released.

Hey, not sure if I'm doing it wrong, or if "feature released" is only python2 (which was the OP's version).

I open terminal pip install geopy. Asked some AWS folks at an event and they said to install from within notebook, because the instance of Python is specific to the notebook. That doesn't work in normal notebooks, but, hey look, it still doesn't work. @cgarciae's trick does. Is that supposed to be how we install them?

Is this feature only working with tensorflow?

Was this page helpful?
0 / 5 - 0 ratings