kopia lustrzana https://github.com/OpenDroneMap/WebODM
Add --worker-cpus option
rodzic
24f3b38dce
commit
bc0c4ac3e0
|
@ -0,0 +1,4 @@
|
|||
version: '2.2'
|
||||
services:
|
||||
worker:
|
||||
cpus: ${WO_WORKER_CPUS}
|
12
webodm.sh
12
webodm.sh
|
@ -142,6 +142,12 @@ case $key in
|
|||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
--worker-cpus)
|
||||
WO_WORKER_CPUS="$2"
|
||||
export WO_WORKER_CPUS
|
||||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
*) # unknown option
|
||||
POSITIONAL+=("$1") # save it in an array for later
|
||||
shift # past argument
|
||||
|
@ -185,6 +191,7 @@ usage(){
|
|||
echo " --gpu Use GPU NodeODM nodes (Linux only) (default: disabled)"
|
||||
echo " --settings Path to a settings.py file to enable modifications of system settings (default: None)"
|
||||
echo " --worker-memory Maximum amount of memory allocated for the worker process (default: unlimited)"
|
||||
echo " --worker-cpus Maximum number of CPUS allocated for the worker process (default: all)"
|
||||
|
||||
exit
|
||||
}
|
||||
|
@ -371,6 +378,7 @@ start(){
|
|||
echo "Default Nodes: $WO_DEFAULT_NODES"
|
||||
echo "Settings: $WO_SETTINGS"
|
||||
echo "Worker memory limit: $WO_WORKER_MEMORY"
|
||||
echo "Worker cpus limit: $WO_WORKER_CPUS"
|
||||
echo "================================"
|
||||
echo "Make sure to issue a $0 down if you decide to change the environment."
|
||||
echo ""
|
||||
|
@ -445,6 +453,10 @@ start(){
|
|||
command+=" -f docker-compose.worker-memory.yml"
|
||||
fi
|
||||
|
||||
if [ ! -z "$WO_WORKER_CPUS" ]; then
|
||||
command+=" -f docker-compose.worker-cpu.yml"
|
||||
fi
|
||||
|
||||
command="$command up"
|
||||
|
||||
if [[ $detached = true ]]; then
|
||||
|
|
Ładowanie…
Reference in New Issue