Package: dcm-processor
DCM PROCESSORA dicom processing library setup with docker containers.DEPENDENCIESPython (version  >= 3.6)DockerDocker Compose  (you can install withpippackage manager with the commandpip install docker-compose)NOTES ON DEPENDENCIESCurrent version of the library supports only unix (linux and macOS). However the library was developed and well tested on Ubuntu 20.04.Current user should have access to execute docker commands without sudo. This can be normally achieved in linux with the command below:sudo usermod -aG docker $USERYou need to make sure you have the current version ofdocker-composeinstalled.INSTALLATIONpip install dcm-processorCREATE AN APPLICATIONRun the command below and follow the prompt.dcm-processor create appIn case you did not selectyesto initialize the application after creation then run the command below to initialize the application.dcm-processor init appSTART AN APPLICATIONRun the command below and select the application to start it.dcm-processor start appSTOP AN APPLICATIONRun the command below and select the application to remove it.dcm-processor stop appCREATE A SERVICE TEMPLATERun command below and follow prompt to create a service template.dcm-processor create serviceFill in the files inregistryfolder and copy your source code into themodulefolder.Service entry in theregistryThesettings.jsonfile can either be an object or an array of objects with the following fields:jobName:  [string,required] the name of the job, this should be unique from other service jobs.worker: [string,required] name of the function to be run as the worker, this should be a full function name. (see section below for details.).callback: [string,required] name of the function which determines if a job should be scheduled for the current dicom processing or not. (see section below for details).dependsOn: [string/list of string,optional] name(s) of jobs which the current service job depends on. this will make sure that those jobs run successfully before this job runs.priority: [string,optional] the priority level assigned to this job. if not specified a default priority is assigned.timeout: [string/number,optional] the RQ queuing timeout default is 1 hour.params: [object,optional] this is an object with additional parameters that will be sent to the worker function.sortPosition: [number,optional] this is a sorting variable which is used to sort the order in which jobs are scheduled (Note: independent jobs are however scheduled before dependent jobs).description: [string,optional] this is a description for this current job. Its not used in any operation but only for third parties to have an idea what your service does.The python file__init__.pyshould contain thecallbackfunction(s) you stated in thesettings.jsonfileINSTALL SERVICERun command below and follow prompt to install a service.dcm-processor install serviceREMOVE SERVICERun command below and follow prompt to remove a service.dcm-processor remove serviceCREATE WORKER TEMPLATERun command below and follow prompt to create a worker template.dcm-processor create workerFill in the files as follows:Thesettings.jsonfile can either be an object or an array of objects with the following fields:name:  [string,required] the name of the worker, this should be unique from other worker.scripts: [list of shell scripts] scripts that are executedduring building of the docker imageto install optional packages etc. defaults["script.sh"]pointing to the default script file in the template.entryScriptPaths: [list of mounted paths] name of docker mounted path which will contain shell script that are executed at the start of the worker. This can be used to executed dynamic shell scriptsduring container runtime.baseImage: [string, required] name of the base docker image to build the container on. defaults ubuntu:20.04.environments: [list of objects] a list of virtual environment configurations. Each object contains the fields below:name: [string, required] the name of the virtualenv. Should be unique for all virtualenvs in the current worker.requirements: [list of file paths] requirements files with python libraries to be installed in the virtualenv. This is executedduring building of the docker image.entryRequirementPaths: [list of mounted paths] List of docker mounted paths which will contain requirements files which can be used to update the python library dynamically. These are executed at the start of the workerduring runtime.channels: [list of string] this is the list ofservice channelsthat will be executed with this virtualenv.pythonVersion: [string] the version of python to be used for this virtualenv.Thescript.shcan be used to run any shell commands needed to install extra packages likejava, compilers, etcneeded to run the service modules.Therequirements.txtshould be filled with the python libraries needed to run the service modules.INSTALL WORKERRun command below and follow prompt to install a worker.dcm-processor install workerREMOVE WORKERRun command below and follow prompt to remove a worker.dcm-processor remove workerTO DOSAdd documentation for non-interactive (-o) mode.Add autostart function to start applications at boot time.Support windows environment.Run tests on other linux systems.