Skip to main content

C-PAC Python Package

Project description

A Python package that wraps C-PAC, enabling users to install cpac with pip and run from the command line.

Description

C-PAC Python Package is a lightweight Python package that handles interfacing a user’s machine and a C-PAC container through a command line interface.

Dependencies

Usage

cpac --help
usage: cpac [-h] [--version] [-o [OPT [OPT ...]]]
            [-B [CUSTOM_BINDING [CUSTOM_BINDING ...]]]
            [--platform {docker,singularity}] [--image IMAGE] [--tag TAG]
            [--working_dir PATH] [-v] [-vv]
            {run,group,utils,pull,upgrade,crash} ...

cpac: a Python package that simplifies using C-PAC <http://fcp-indi.github.io> containerized images.

This commandline interface package is designed to minimize repetition.
As such, nearly all arguments are optional.

When launching a container, this package will try to bind any paths mentioned in
 • the command
 • the data configuration

An example minimal run command:
    cpac run /path/to/data /path/for/outputs

An example run command with optional arguments:
    cpac -B /path/to/data/configs:/configs \
            --image fcpindi/c-pac --tag latest \
            run /path/to/data /path/for/outputs \
            --data_config_file /configs/data_config.yml \
            --save_working_dir

Each command can take "--help" to provide additonal usage information, e.g.,

    cpac run --help

positional arguments:
  {run,group,utils,pull,upgrade,crash}

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -o [OPT [OPT ...]], --container_option [OPT [OPT ...]]
                        parameters and flags to pass through to Docker or Singularity

                        This flag can take multiple arguments so cannot be
                        the final argument before the command argument (i.e.,
                        run or any other command that does not start with - or --)
  -B [CUSTOM_BINDING [CUSTOM_BINDING ...]], --custom_binding [CUSTOM_BINDING [CUSTOM_BINDING ...]]
                        directories to bind with a different path in
                        the container than the real path of the directory.
                        One or more pairs in the format:
                            real_path:container_path
                        (eg, /home/C-PAC/run5/outputs:/outputs).
                        Use absolute paths for both paths.

                        This flag can take multiple arguments so cannot be
                        the final argument before the command argument (i.e.,
                        run or any other command that does not start with - or --)
  --platform {docker,singularity}
                        If neither platform nor image is specified,
                        cpac will try Docker first, then try
                        Singularity if Docker fails.
  --image IMAGE         path to Singularity image file OR name of Docker image (eg, "fcpindi/c-pac").
                        Will attempt to pull from Singularity Hub or Docker Hub if not provided.
                        If image is specified but platform is not, platform is
                        assumed to be Singularity if image is a path or
                        Docker if image is an image name.
  --tag TAG             tag of the Docker image to use (eg, "latest" or "nightly").
  --working_dir PATH    working directory
  -v, --verbose         set loglevel to INFO
  -vv, --very-verbose   set loglevel to DEBUG

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cpac, version 0.3.2.post1
Filename, size File type Python version Upload date Hashes
Filename, size cpac-0.3.2.post1-py2.py3-none-any.whl (18.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size cpac-0.3.2.post1.tar.gz (36.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page