fix: remove sagemaker-local network before compose
Issue #, if available: Issue #4659
Description of changes:
Simple bug fix to the linked issue, run "docker network rm sagemaker-local" before doing the docker compose during setup for a processing job in local mode, stream the output and continue if the network rm fails. The bug I was seeing was from the sagemaker-local network already existing before the job was ran, so this should tear it down before docker-compose and fix it.
Testing done:
No new tests added, ran with existing unit tests locally and results remain the same.
Merge Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.
General
- [x] I have read the CONTRIBUTING doc
- [x] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
- [x] I used the commit message format described in CONTRIBUTING
- [x] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
- [x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)
Tests
- [x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
- [x] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
- [x] I have checked that my tests are not configured for a specific region or account (if appropriate)
- [x] I have used
unique_name_from_baseto create resource names in integ tests (if appropriate)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
This also fixes the scenario when a user ctrl+c's or kill -9's the python process running a local mode job so it never cleans up the compose stack. That happens more frequently than one would think.
@mufaddal-rohawala have you had a chance to take a look at this yet?
@bzheng06 can you force push a temp commit to restart the workflow?
@sage-maker pushed to restart
@sage-maker temp commit has been pushed, PR still needs approval
Can you check integ tests?
Can you check integ tests?
@sage-maker Synced with the most recent changes to master and pushed