FNNDSC / pman

A process management system written in python
MIT License
23 stars 33 forks source link

Added support for parallelized image plugins. #67

Closed Chris210634 closed 6 years ago

Chris210634 commented 6 years ago

@danmcp

This pull request is identical to pull request last week, except that I set three environmental variables in the plug-in pod for NUMBER_OF_WORKERS, CPU_LIMIT, and MEMORY_LIMIT.

The way you call pman would still be the same, except for the three additional optional arguments, as follows.

pfurl --verb POST --raw --http pman-myproject.127.0.0.1.nip.io/api/v1/cmd --jsonwrapper 'payload' --msg \
        "{   \"action\": \"run\",
            \"meta\":  {
                \"cmd\": \"\$execshell \$selfpath/\$selfexec --prefix test- --sleepLength 0 /share/incoming /share/outgoing\",
                \"auid\": \"rudolphpienaar\",
                \"jid\": \"003\",
                \"threaded\": true,
                \"container\": {
                        \"target\": {
                            \"image\": \"fnndsc/pl-simpledsapp\",
                            \"cmdParse\": true
                        }
                },
                \"cpu_limit\": \"2000m\",
                \"memory_limit\": \"2Gi\",
                \"number_of_workers\": \"2\"
            }
        }" --quiet --jsonpprintindent 4
danmcp commented 6 years ago

LGTM

@rudolphpienaar Thoughts?

rudolphpienaar commented 6 years ago

Me too. Feel free to merge @danmcp or let me know if I should.