Package: cpac
A Python package that wrapsC-PAC, enabling users to install cpac withpipand run from the command line.Descriptioncpac Python Package is a lightweight Python package that handles interfacing a user’s machine and a C-PAC container through a command line interface.Note about cpac versioningThis package’s versioning scheme changed in version 1.8.5 to match C-PAC’s versioning. From cpac v1.8.5 forward, the version of cpac indicates the newest supported version of C-PAC.DependenciesPython≥ 3.8pipAt least one of:DockerSingularity≥2.5Usagecpac--helpusage:cpac[-h][--version][-oOPT][-BCUSTOM_BINDING][--platform{docker,singularity}][--imageIMAGE][--tagTAG][--working_dirPATH][-v][-vv]{run,utils,version,group,pull,upgrade,enter,bash,shell,parse-resources,parse_resources,crash}...cpac:aPythonpackagethatsimplifiesusingC-PAC<http://fcp-indi.github.io>containerizedimages.Thiscommandlineinterfacepackageisdesignedtominimizerepetition.Assuch,nearlyallargumentsareoptional.Whenlaunchingacontainer,thispackagewilltrytobindanypathsmentionedin•thecommand•thedataconfigurationAnexampleminimalruncommand:cpacrun/path/to/data/path/for/outputsAnexampleruncommandwithoptionalarguments:cpac-B/path/to/data/configs:/configs\--imagefcpindi/c-pac--taglatest\run/path/to/data/path/for/outputs\--data_config_file/configs/data_config.yml\--save_working_dirEachcommandcantake"--help"toprovideadditonalusageinformation,e.g.,cpacrun--helpKnownissues:-SomeDockercontainersunexpectedlypersistaftercpacfinishes.Toclearthem,run1.`dockerps`tolistthecontainersForeachC-PACconatainerthatpersists,run2.`dockerattach<container_name>`3.`exit`-https://github.com/FCP-INDI/cpac/issuespositionalarguments:{run,utils,version,group,pull,upgrade,enter,bash,shell,parse-resources,parse_resources,crash}runRunC-PAC.See"cpac [--platform {docker,singularity}] [--image IMAGE] [--tag TAG] run --help"formoreinformation.utilsRunC-PACcommandlineutilities.See"cpac [--platform {docker,singularity}] [--image IMAGE] [--tag TAG] utils --help"formoreinformation.versionPrinttheversionofC-PACthatcpacisusing.groupRunagrouplevelanalysisinC-PAC.See"cpac [--platform {docker,singularity}] [--image IMAGE] [--tag TAG] group --help"formoreinformation.pull(upgrade)UpgradeyourlocalC-PACversiontothelatestversionbypullingfromDockerHuborotherrepository.Usewith"--image"and/or"--tag"tospecifyanimageotherthanthedefault"fcpindi/c-pac:latest"topull.enter(bash,shell)EnteranewC-PACcontainerviaBASH.parse-resources(parse_resources).Whenprovidedwitha`callback.log`file,thisutilitycansortthroughthememory`runtime`usage,`estimate`,andassociated`efficiency`,toidentifythe`n`taskswiththe`highest`or`lowest`ofeachofthesecategories."parse-resources"isintendedtoberunoutsideaC-PACcontainer.See"cpac parse-resources --help"formoreinformation.crashConvertacrashpickletoplaintext(C-PAC<1.8.0).options:-h,--helpshowthishelpmessageandexit--versionshowprogram'sversionnumberandexit-oOPT,--container_optionOPTparametersandflagstopassthroughtoDockerorSingularityThisflagcantakemultipleargumentssocannotbethefinalargumentbeforethecommandargument(i.e.,runoranyothercommandthatdoesnotstartwith-or--)-BCUSTOM_BINDING,--custom_bindingCUSTOM_BINDINGdirectoriestobindwithadifferentpathinthecontainerthantherealpathofthedirectory.Oneormorepairsintheformat:real_path:container_path(eg,/home/C-PAC/run5/outputs:/outputs).Useabsolutepathsforbothpaths.Thisflagcantakemultipleargumentssocannotbethefinalargumentbeforethecommandargument(i.e.,runoranyothercommandthatdoesnotstartwith-or--)--platform{docker,singularity}Ifneitherplatformnorimageisspecified,cpacwilltryDockerfirst,thentrySingularityifDockerfails.--imageIMAGEpathtoSingularityimagefileORnameofDockerimage(eg,"fcpindi/c-pac").WillattempttopullfromSingularityHuborDockerHubifnotprovided.Ifimageisspecifiedbutplatformisnot,platformisassumedtobeSingularityifimageisapathorDockerifimageisanimagename.--tagTAGtagoftheDockerimagetouse(eg,"latest"or"nightly").--working_dirPATHworkingdirectory-v,--verbosesetlogleveltoINFO-vv,--very-verbosesetlogleveltoDEBUG