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
dgl
Commits
3e2b5a04
Unverified
Commit
3e2b5a04
authored
Jun 20, 2023
by
Rhett Ying
Committed by
GitHub
Jun 20, 2023
Browse files
[dev] enable specifying conda env name (#5886)
parent
d381f226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
script/create_dev_conda_env.sh
script/create_dev_conda_env.sh
+12
-3
No files found.
script/create_dev_conda_env.sh
View file @
3e2b5a04
...
...
@@ -12,6 +12,7 @@ examples:
bash
$0
-g 11.7
bash
$0
-g 11.7 -p 3.8
bash
$0
-g 11.7 -p 3.8 -t 1.13.0
bash
$0
-c -n dgl-dev-cpu
Create a developement environment for DGL developers.
...
...
@@ -23,6 +24,7 @@ OPTIONS:
environment of the same name).
-g Create dev environment in GPU mode with specified CUDA version,
supported:
${
CUDA_VERSIONS
}
.
-n Specify the name of the environment.
-o Save environment YAML file to specified path.
-p Create dev environment based on specified python version.
-s Run silently which indicates always 'yes' for any confirmation.
...
...
@@ -51,7 +53,7 @@ confirm() {
}
# Parse flags.
while
getopts
"cdfg:ho:p:st:"
flag
;
do
while
getopts
"cdfg:h
n:
o:p:st:"
flag
;
do
case
"
${
flag
}
"
in
c
)
cpu
=
1
...
...
@@ -69,6 +71,9 @@ while getopts "cdfg:ho:p:st:" flag; do
usage
exit
0
;;
n
)
name
=
${
OPTARG
}
;;
o
)
output_path
=
${
OPTARG
}
;;
...
...
@@ -109,7 +114,9 @@ fi
# Set up CPU mode.
if
[[
${
cpu
}
-eq
1
]]
;
then
torchversion
=
${
torch_version
}
"+cpu"
name
=
"dgl-dev-cpu"
if
[[
-z
"
${
name
}
"
]]
;
then
name
=
"dgl-dev-cpu"
fi
fi
# Set up GPU mode.
...
...
@@ -124,7 +131,9 @@ if [[ -n ${cuda_version} ]]; then
[[
-n
"
${
always_yes
}
"
]]
||
confirm
torchversion
=
${
torch_version
}
"+cu"
${
cuda_version
//[-._]/
}
name
=
"dgl-dev-gpu"
if
[[
-z
"
${
name
}
"
]]
;
then
name
=
"dgl-dev-gpu-"
${
cuda_version
//[-._]/
}
fi
fi
# Set python version.
...
...
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