Casa_distro is the BrainVISA suite distribution swiss knife. It allows to setup a virtual environment and launch BrainVISA software. See http://brainivsa.info/casa-distro and https://github.com/brainvisa/casa-distro for more information
Version : 3.1.3
usage:
casa_distro <general options> <command> [<command parameters>...]
- general optional arguments:
- -v, --verbose
Display as much information as possible.
- --version
Display casa-distro version number and exit.
- -h, --help
Display help message and exit. If used after command name, display only the help of this command.
Common parameters:¶
Most commands accept more or less the same parameters.
Many subcommands need environment selection specifications: see the documentation on how to specify an environment.
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.
Commands:¶
help¶
Print global help or help about a command.
Parameters¶
- format
format help text in a given text format. Valid values are “text” (default) for raw text, or rst (RST/sphinx format).
- full
if
true
oryes
or1
, display each subcommand parameters documentation in the general help.
distro¶
List all available distro and provide information for each one.
list¶
List run or dev environments created by “setup”/”setup_dev” command.
Parameters¶
- type
default=None
If given, select environment having the given type.
- distro
default=None
If given, select environment having the given distro name.
- branch
default=None
If given, select environment having the given branch.
- system
default=None
If given, select environments having the given system name.
- image_version
default=None
If given, select environments having the given image version.
- name
default=None
If given, select environment by its name. It replaces type, distro, branch and system and is shorter to select one.
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.- json
default = no The output is written as a list of configuration dictionaries in JSON format.
- verbose
default=None
Print more detailed information if value is
yes
,true
or1
.
run¶
Start any command in a selected run or dev environment
example:
casa_distro branch=master ls -als /casa
Parameters¶
- type
default=None
If given, select environment having the given type.
- distro
default=None
If given, select environment having the given distro name.
- branch
default=None
If given, select environment having the given branch.
- system
default=None
If given, select environments having the given system name.
- image_version
default=None
If given, select environments having the given image version.
- name
default=None
If given, select environment by its name. It replaces type, distro, branch and system and is shorter to select one.
- version
If given, select environment by its version (only applicable to user environments, not dev)
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.- gui
default=True
If
no
,false
or0
, command is not using a graphical user interface (GUI). Nothing is done to connect the container to a graphical interface. This option may be necessary in context where a graphical interface is not available.- opengl
default=auto
Setup different ways of trying to use OpenGL 3D rendering and GPU.
auto
,container
,nv
, orsoftware
.auto
: use a heuristic to choose the best option that is safe based on the host configurationcontainer
: passes no special options to Singularity: the mesa installed in the container is usednv
tries to mount the proprietary NVidia driver of the host (linux) system in the containersoftware
sets LD_LIBRARY_PATH to use a software-only OpenGL rendering. This solution is the slowest but is a fallback when no other solution works.
- root
default=False
If
yes
,true
or1
, start execution as system administrator. For Singularity container, this requires administrator privileges on host system.- cwd
Set current working directory to the given value before launching the command. By default, it is the same working directory as on the host
- env
Comma separated list of environment variables to pass to the command. Each variable must have the form name=value.
- image
Force usage of a specific virtual image instead of the one defined in the environment configuration.
- container_options
Comma separated list of options to add to the command line used to call the container system.
- verbose
default=None
Print more detailed information if value is
yes
,true
or1
.
pull_image¶
Update the container images. By default the current image and
all images that are used by at least one casa-distro environment
are selected (these environments are listed by the list
command).
There are two ways of selecting the image(s) to be updated:
filtered by environment, using the
name
selector, or a combination ofdistro
,branch
, andimage_version
.casa_distro pull_image type=dev image_version=5.0
directly specifying an image file name
casa_distro pull_image image=/home/me/casa-run-5.0.sif
Then the command look for an updated version of selected images in the
site given by url
parameter. These files are downloaded (as well as
the corresponding JSON metadata file) and the config files using the
current images are modified to use the updated ones. Finally, the original
images are deleted (unless cleanup=no
is used).
Updated images are located using file name pattern. An updatable image file name must match the following pattern:
{name}-{version}[-{patch}].{extension}
Where:
{name}
is the name of the image (e.gcasa-dev
){version}
is the image version with pattern x.y[.z]{patch}
is an integer{version}
is the file name extension (e.g.sif
)
An updated version of a given image is any other image with the same
pattern having the same name
, version
and extension
and a
higher patch
. If several updated version are available for an image,
the one with the greatest patch
is selected.
Parameters¶
- distro
default=None
If given, select environment having the given distro name.
- branch
default=None
If given, select environment having the given branch.
- system
default=None
If given, select environments having the given system name.
- type
default=None
If given, select environment having the given type.
- image_version
default=None
If given, select environments having the given image version.
- version
If given, select environment by its version (only applicable to user environments, not dev)
- name
default=None
If given, select environment by its name. It replaces type, distro, branch and system and is shorter to select one.
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.- image
Force usage of a specific virtual image instead of the one defined in the environment configuration.
- url
default=https://brainvisa.info/download URL where to download images.
- mode
default=standard Possible values are:
standard: download only newer version of existing image
force: re-download of images even if they are locally present and up-to-date.
fake: don’t change anything to images. Just display what images and config files would be modified by other modes.
- cleanup
default=yes if true (or 1, or yes), remove current image when succesfully finished to download new one.
- verbose
default=None
Print more detailed information if value is
yes
,true
or1
.
shell¶
Start a bash shell in the configured container with the given pository configuration.
Parameters¶
- type
default=None
If given, select environment having the given type.
- distro
default=None
If given, select environment having the given distro name.
- branch
default=None
If given, select environment having the given branch.
- system
default=None
If given, select environments having the given system name.
- image_version
default=None
If given, select environments having the given image version.
- name
default=None
If given, select environment by its name. It replaces type, distro, branch and system and is shorter to select one.
- version
If given, select environment by its version (only applicable to user environments, not dev)
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.- gui
default=True
If
no
,false
or0
, command is not using a graphical user interface (GUI). Nothing is done to connect the container to a graphical interface. This option may be necessary in context where a graphical interface is not available.- opengl
default=auto
Setup different ways of trying to use OpenGL 3D rendering and GPU.
auto
,container
,nv
, orsoftware
.auto
: use a heuristic to choose the best option that is safe based on the host configurationcontainer
: passes no special options to Singularity: the mesa installed in the container is usednv
tries to mount the proprietary NVidia driver of the host (linux) system in the containersoftware
sets LD_LIBRARY_PATH to use a software-only OpenGL rendering. This solution is the slowest but is a fallback when no other solution works.
- root
default=False
If
yes
,true
or1
, start execution as system administrator. For Singularity container, this requires administrator privileges on host system.- cwd
Set current working directory to the given value before launching the command. By default, it is the same working directory as on the host
- env
Comma separated list of environment variables to pass to the command. Each variable must have the form name=value.
- image
Force usage of a specific virtual image instead of the one defined in the environment configuration.
- container_options
Comma separated list of options to add to the command line used to call the container system.
- verbose
default=None
Print more detailed information if value is
yes
,true
or1
.
mrun¶
Start any command in one or several container with the given repository configuration. By default, command is executed in all existing build workflows.
example:
# Launch bv_maker on all build workflows using any version of Ubuntu
casa_distro mrun bv_maker system=ubuntu-*
Parameters¶
- type
default=None
If given, select environment having the given type.
- distro
default=None
If given, select environment having the given distro name.
- branch
default=None
If given, select environment having the given branch.
- system
default=None
If given, select environments having the given system name.
- image_version
default=None
If given, select environments having the given image version.
- name
default=None
If given, select environment by its name. It replaces type, distro, branch and system and is shorter to select one.
- version
If given, select environment by its version (only applicable to user environments, not dev)
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.- gui
default=True
If
no
,false
or0
, command is not using a graphical user interface (GUI). Nothing is done to connect the container to a graphical interface. This option may be necessary in context where a graphical interface is not available.- opengl
default=auto
Setup different ways of trying to use OpenGL 3D rendering and GPU.
auto
,container
,nv
, orsoftware
.auto
: use a heuristic to choose the best option that is safe based on the host configurationcontainer
: passes no special options to Singularity: the mesa installed in the container is usednv
tries to mount the proprietary NVidia driver of the host (linux) system in the containersoftware
sets LD_LIBRARY_PATH to use a software-only OpenGL rendering. This solution is the slowest but is a fallback when no other solution works.
- root
default=False
If
yes
,true
or1
, start execution as system administrator. For Singularity container, this requires administrator privileges on host system.- cwd
Set current working directory to the given value before launching the command. By default, it is the same working directory as on the host
- env
Comma separated list of environment variables to pass to the command. Each variable must have the form name=value.
- image
Force usage of a specific virtual image instead of the one defined in the environment configuration.
- container_options
Comma separated list of options to add to the command line used to call the container system.
- verbose
default=None
Print more detailed information if value is
yes
,true
or1
.
bv_maker¶
Start a bv_maker in the configured container with the given repository configuration.
Parameters¶
- type
default=dev
If given, select environment having the given type.
- distro
default=None
If given, select environment having the given distro name.
- branch
default=None
If given, select environment having the given branch.
- system
default=None
If given, select environments having the given system name.
- image_version
default=None
If given, select environments having the given image version.
- name
default=None
If given, select environment by its name. It replaces type, distro, branch and system and is shorter to select one.
- base_directory
default=
$HOME/casa_distro
Directory where images and environments are stored. This parameter can be passed on the commandline, or set via the
CASA_BASE_DIRECTORY
environment variable.- env
Comma separated list of environment variables to pass to the command. Each variable must have the form name=value.
- image
Force usage of a specific virtual image instead of the one defined in the environment configuration.
- container_options
Comma separated list of options to add to the command line used to call the container system.
- verbose
default=None
Print more detailed information if value is
yes
,true
or1
.