sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

Installing Dependencies

Open cgarciae opened this issue 8 years ago • 5 comments

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.

cgarciae avatar Jan 21 '18 16:01 cgarciae

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.

owen-t avatar Jan 22 '18 17:01 owen-t

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(" "))

cgarciae avatar Jan 22 '18 17:01 cgarciae

This feature has been released.

nadiaya avatar Mar 07 '18 00:03 nadiaya

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?

Jacob-Stevens-Haas avatar Sep 22 '18 16:09 Jacob-Stevens-Haas

Is this feature only working with tensorflow?

dshahrokhian avatar Jun 13 '19 22:06 dshahrokhian