Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sagemaker Fails to download code from S3 #85

Open
uwaisiqbal opened this issue Nov 26, 2020 · 0 comments
Open

Sagemaker Fails to download code from S3 #85

uwaisiqbal opened this issue Nov 26, 2020 · 0 comments

Comments

@uwaisiqbal
Copy link

uwaisiqbal commented Nov 26, 2020

Describe the bug
When using sagemaker in script mode, if there are files in the /opt/ml/code directory, sagemaker doesn't download the packaged code from S3.

In my Dockerfile to build the image, I copy over some files into /opt/ml/code and I would like to use this container in a way where I can execute my scripts against it with sagemaker script mode. However it seems as though the scripts which are uploaded and packaged to s3 are never actually downloaded once the instance spins up and sagemaker starts. It fails to find the script I supplied.

When I tried running it without copying my code into /opt/ml/code in the Dockerfile everything worked fine. I think there is a problematic line of code which enforces this logic to only download the code when the /opt/ml/code directory is empty.

You can find the problematic line here:
When run is called and the files are attempted to be downloaded:

files.download_and_extract(uri=uri, path=environment.code_dir)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants