Configure GPU type/count from command line in GCE scripts (#1376)
* Configure GPU type/count from command line in GCE scripts * Change CLI to input full leader machine type information with GPU
This commit is contained in:
parent
dbc1ffc75e
commit
7fb7839c8f
|
@ -71,6 +71,7 @@ Manage testnet instances
|
||||||
-P - Use public network IP addresses (default: $publicNetwork)
|
-P - Use public network IP addresses (default: $publicNetwork)
|
||||||
-z [zone] - Zone for the nodes (default: $zone)
|
-z [zone] - Zone for the nodes (default: $zone)
|
||||||
-g - Enable GPU (default: $enableGpu)
|
-g - Enable GPU (default: $enableGpu)
|
||||||
|
-G - Enable GPU, and set count/type of GPUs to use (e.g $cpuLeaderMachineType --accelerator count=4,type=nvidia-tesla-k80)
|
||||||
-a [address] - Set the leader node's external IP address to this value.
|
-a [address] - Set the leader node's external IP address to this value.
|
||||||
For GCE, [address] is the "name" of the desired External
|
For GCE, [address] is the "name" of the desired External
|
||||||
IP Address.
|
IP Address.
|
||||||
|
@ -94,7 +95,7 @@ command=$1
|
||||||
shift
|
shift
|
||||||
[[ $command = create || $command = config || $command = delete ]] || usage "Invalid command: $command"
|
[[ $command = create || $command = config || $command = delete ]] || usage "Invalid command: $command"
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:z:ga:d:" opt; do
|
while getopts "h?p:Pn:c:z:gG:a:d:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
|
@ -119,6 +120,10 @@ while getopts "h?p:Pn:c:z:ga:d:" opt; do
|
||||||
enableGpu=true
|
enableGpu=true
|
||||||
leaderMachineType="$gpuLeaderMachineType"
|
leaderMachineType="$gpuLeaderMachineType"
|
||||||
;;
|
;;
|
||||||
|
G)
|
||||||
|
enableGpu=true
|
||||||
|
leaderMachineType="$OPTARG"
|
||||||
|
;;
|
||||||
a)
|
a)
|
||||||
leaderAddress=$OPTARG
|
leaderAddress=$OPTARG
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue