Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
deepspeed
Commits
259f894a
Unverified
Commit
259f894a
authored
Mar 11, 2020
by
Jeff Rasley
Committed by
GitHub
Mar 11, 2020
Browse files
Install specific apex hash (#132)
* allow installing a specific apex commit
parent
936117b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
install.sh
install.sh
+14
-3
No files found.
install.sh
View file @
259f894a
...
@@ -21,6 +21,7 @@ hostfile (hostfile: /job/hostfile). If no hostfile exists, will only install loc
...
@@ -21,6 +21,7 @@ hostfile (hostfile: /job/hostfile). If no hostfile exists, will only install loc
-s, --pip_sudo Run pip with sudo (default: no sudo)
-s, --pip_sudo Run pip with sudo (default: no sudo)
-m, --pip_mirror Use the specified pip mirror (default: the default pip mirror)
-m, --pip_mirror Use the specified pip mirror (default: the default pip mirror)
-H, --hostfile Path to MPI-style hostfile (default: /job/hostfile)
-H, --hostfile Path to MPI-style hostfile (default: /job/hostfile)
-a, --apex_commit Install a specific commit hash of apex, instead of the one deepspeed points to
-h, --help This help text
-h, --help This help text
"""
"""
}
}
...
@@ -34,6 +35,7 @@ pip_sudo=0
...
@@ -34,6 +35,7 @@ pip_sudo=0
entire_dlts_job
=
1
entire_dlts_job
=
1
hostfile
=
/job/hostfile
hostfile
=
/job/hostfile
pip_mirror
=
""
pip_mirror
=
""
apex_commit
=
""
while
[[
$#
-gt
0
]]
while
[[
$#
-gt
0
]]
do
do
...
@@ -64,6 +66,11 @@ case $key in
...
@@ -64,6 +66,11 @@ case $key in
shift
shift
shift
shift
;;
;;
-a
|
--apex_commit
)
apex_commit
=
$2
;
shift
shift
;;
-H
|
--hostfile
)
-H
|
--hostfile
)
hostfile
=
$2
hostfile
=
$2
if
[
!
-f
$2
]
;
then
if
[
!
-f
$2
]
;
then
...
@@ -110,9 +117,6 @@ else
...
@@ -110,9 +117,6 @@ else
fi
fi
install_apex
=
"
$PIP_SUDO
""
$PIP_INSTALL
"
'-v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" third_party/apex'
if
[
!
-f
$hostfile
]
;
then
if
[
!
-f
$hostfile
]
;
then
echo
"No hostfile exists at
$hostfile
, installing locally"
echo
"No hostfile exists at
$hostfile
, installing locally"
local_only
=
1
local_only
=
1
...
@@ -128,6 +132,13 @@ if [ "$third_party_install" == "1" ]; then
...
@@ -128,6 +132,13 @@ if [ "$third_party_install" == "1" ]; then
echo
"Building apex wheel"
echo
"Building apex wheel"
cd
third_party/apex
cd
third_party/apex
if
[
"
$apex_commit
"
!=
""
]
;
then
echo
"Installing a non-standard version of apex at commit:
$apex_commit
"
git fetch
git checkout
$apex_commit
fi
python setup.py
--cpp_ext
--cuda_ext
bdist_wheel
python setup.py
--cpp_ext
--cuda_ext
bdist_wheel
cd
-
cd
-
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment