-
-
Notifications
You must be signed in to change notification settings - Fork 656
Updated hvd images + scripts #1306
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "Build all Horovod flavoured PyTorch-Ignite images" | ||
|
|
||
| # Start script from ignite docker folder | ||
| if [ ! -d hvd ]; then | ||
| echo "Can not find 'hvd' folder" | ||
| echo "Usage: sh hvd/build_all.sh" | ||
| exit 1 | ||
| fi | ||
|
|
||
| curr_dir=$PWD | ||
| cd $curr_dir/hvd | ||
|
|
||
| set -xeu | ||
|
|
||
| image_name="hvd-base" | ||
|
|
||
| docker build -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} . | ||
| image_tag=`docker run --rm -it pytorchignite/${image_name}:latest -c 'python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"'` | ||
| docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| for image_name in "hvd-vision" "hvd-nlp" "hvd-apex" "hvd-apex-vision" "hvd-apex-nlp" | ||
| do | ||
|
|
||
| docker build -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} . | ||
| docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| done | ||
|
|
||
| cd $curr_dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "Build all PyTorch-Ignite images" | ||
|
|
||
| # Start script from ignite docker folder | ||
| if [ ! -d main ]; then | ||
| echo "Can not find 'main' folder" | ||
| echo "Usage: sh main/build_all.sh" | ||
| exit 1 | ||
| fi | ||
|
|
||
| curr_dir=$PWD | ||
| cd $curr_dir/main | ||
|
|
||
| set -xeu | ||
|
|
||
| image_name="base" | ||
|
|
||
| docker build -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} . | ||
| image_tag=`docker run --rm -it pytorchignite/${image_name}:latest -c 'python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"'` | ||
| docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| for image_name in "vision" "nlp" "apex" "apex-vision" "apex-nlp" | ||
| do | ||
|
|
||
| docker build -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} . | ||
| docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| done | ||
|
|
||
| cd $curr_dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "Build all MS DeepSpeed flavoured PyTorch-Ignite images" | ||
|
|
||
| # Start script from ignite docker folder | ||
| if [ ! -d msdp ]; then | ||
| echo "Can not find 'msdp' folder" | ||
| echo "Usage: sh msdp/build_all.sh" | ||
| exit 1 | ||
| fi | ||
|
|
||
| curr_dir=$PWD | ||
| cd $curr_dir/msdp | ||
|
|
||
| set -xeu | ||
|
|
||
| image_name="msdp-apex-base" | ||
|
|
||
| docker build -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} . | ||
| image_tag=`docker run --rm -it pytorchignite/${image_name}:latest -c 'python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"'` | ||
| docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| for image_name in "msdp-apex-vision" "msdp-apex-nlp" | ||
| do | ||
|
|
||
| docker build -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} . | ||
| docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| done | ||
|
|
||
| cd $curr_dir | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "Push all PyTorch-Ignite docker images" | ||
|
|
||
| if [ -z $DOCKER_USER ]; then | ||
| echo "Can not find DOCKER_USER env variable" | ||
| echo "Please, export DOCKER_USER=<username> before calling this script" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z $DOCKER_TOKEN ]; then | ||
| echo "Can not find DOCKER_TOKEN env variable" | ||
| echo "Please, export DOCKER_TOKEN=<token> before calling this script" | ||
| exit 1 | ||
| fi | ||
|
|
||
| set -eu | ||
|
|
||
| echo $DOCKER_TOKEN | docker login --username=$DOCKER_USER --password-stdin | ||
|
|
||
| set -xeu | ||
|
|
||
| image_name="base" | ||
| image_tag=`docker run --rm -it pytorchignite/${image_name}:latest -c 'python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"'` | ||
|
|
||
| for image_name in "base" "vision" "nlp" "apex" "apex-vision" "apex-nlp" | ||
| do | ||
|
|
||
| docker push pytorchignite/${image_name}:latest | ||
| docker push pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| done | ||
|
|
||
|
|
||
| image_name="hvd-base" | ||
| image_tag=`docker run --rm -it pytorchignite/${image_name}:latest -c 'python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"'` | ||
|
|
||
| for image_name in "hvd-base" "hvd-vision" "hvd-nlp" "hvd-apex" "hvd-apex-vision" "hvd-apex-nlp" | ||
| do | ||
|
|
||
| docker push pytorchignite/${image_name}:latest | ||
| docker push pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| done | ||
|
|
||
| image_name="msdp-apex-base" | ||
| image_tag=`docker run --rm -it pytorchignite/${image_name}:latest -c 'python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"'` | ||
|
|
||
| for image_name in "msdp-apex-base" "msdp-apex-vision" "msdp-apex-nlp" | ||
| do | ||
|
|
||
| docker push pytorchignite/${image_name}:latest | ||
| docker push pytorchignite/${image_name}:${image_tag} | ||
|
|
||
| done | ||
vfdev-5 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # If use locally, mind to clean dangling images | ||
| # docker images | grep 'pytorchignite\|<none>' | awk '{print $3}' | xargs docker rmi -f | ||
| # or | ||
| # docker image prune | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.