A Command line tool for the dicom processor library
Project description
DCM PROCESSOR
A dicom processing library setup with docker containers.
DEPENDENCIES
- Python (version >= 3.6)
- Docker
- Docker Compose (you can install with
pippackage manager with the commandpip install docker-compose)
NOTES ON DEPENDENCIES
- Current 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 $USER - You need to make sure you have the current version of
docker-composeinstalled.
INSTALLATION
pip install dcm-processor
CREATE AN APPLICATION
-
Run the command below and follow the prompt.
dcm-processor create app -
In case you did not select
yesto initialize the application after creation then run the command below to initialize the application.
dcm-processor init app
START AN APPLICATION
- Run the command below and select the application to start it.
dcm-processor start app
STOP AN APPLICATION
- Run the command below and select the application to remove it.
dcm-processor stop app
CREATE A SERVICE TEMPLATE
- Run command below and follow prompt to create a service template.
dcm-processor create service - Fill in the files in
registryfolder and copy your source code into themodulefolder.
Service entry in the registry
-
The
settings.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.jsonfile
INSTALL SERVICE
- Run command below and follow prompt to install a service.
dcm-processor install service
REMOVE SERVICE
- Run command below and follow prompt to remove a service.
dcm-processor remove service
CREATE WORKER TEMPLATE
-
Run command below and follow prompt to create a worker template.
dcm-processor create worker -
Fill in the files as follows:
-
The
settings.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.
-
-
-
The
script.shcan be used to run any shell commands needed to install extra packages likejava, compilers, etcneeded to run the service modules. -
The
requirements.txtshould be filled with the python libraries needed to run the service modules.
-
INSTALL WORKER
- Run command below and follow prompt to install a worker.
dcm-processor install worker
REMOVE WORKER
- Run command below and follow prompt to remove a worker.
dcm-processor remove worker
TO DOS
- Add documentation for non-interactive (-o) mode.
- Add autostart function to start applications at boot time.
- Support windows environment.
- Run tests on other linux systems.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dcm-processor-1.1.6.tar.gz.
File metadata
- Download URL: dcm-processor-1.1.6.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3f069b771bd966a4c5b7dbb34b5f811c759843a25ab7eea3f22959e3f48a0fb
|
|
| MD5 |
bd660060672293b9f853a731af75b788
|
|
| BLAKE2b-256 |
8d83103f579a9a85de3c03d9864a218141d924ace2e1a8227a17c7002cdca506
|
File details
Details for the file dcm_processor-1.1.6-py3-none-any.whl.
File metadata
- Download URL: dcm_processor-1.1.6-py3-none-any.whl
- Upload date:
- Size: 4.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ba7038a54d92d9a348517f7a1da7ee96c88ff0199e49d889483b0c98e9b637b
|
|
| MD5 |
67d6a3134aa745600a6c42b895e27c0e
|
|
| BLAKE2b-256 |
c38516169b1bc8401e8e42392226b9f6cd6d9797d9d2d1c87dce06381d5b2796
|