AFNI on ARC

From RCSWiki
Revision as of 18:24, 16 October 2023 by Dmitri (talk | contribs) (Created page with "= AFNI Apptainer Containers = The more recent versions of AFNI installed on ARC have been built as Apptainer containers based off of the official public AFNI docker release: [https://hub.docker.com/u/afni]. See also the documentation section about the container: [https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/container.html] The full path to the directory with the container files is <code>/global/software/afni/containers</code>. To see what vers...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

AFNI Apptainer Containers

The more recent versions of AFNI installed on ARC have been built as Apptainer containers based off of the official public AFNI docker release: [1].

See also the documentation section about the container: [2]


The full path to the directory with the container files is /global/software/afni/containers.

To see what versions of containerized AFNI are available, use

$ ls -l /global/software/afni/containers/
total 704396
-rwxr-xr-x 1 drozmano drozmano 718471168 Oct  5 13:27 afni-23.1.10.sif

Running commands from the containers

You can run a command from the container of your choice with the command line like this:

$ apptainer exec <container> <command> [command arguments]

For example, you want to use the container with AFNI 23.1.10, afni-23.1.10.sif, and you want to check the version of the afni command. This is how you can do that:

$ apptainer exec /global/software/afni/containers/afni-23.1.10.sif afni -ver
Precompiled binary linux_ubuntu_16_64_glw_local_shared: Jun 30 2023 (Version AFNI_23.1.10 'Publius Helvius Pertinax')

or help:

$ apptainer exec -B /scratch,/work,/bulk /global/software/afni/containers/afni-23.1.10.sif afni -help | less
 **** Help for all AFNI programs can be found at the Web page
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/index.html

----------------------------------------------------------------
USAGE 1: read in sessions of 3D datasets (created by to3d, etc.)
----------------------------------------------------------------
   afni [options] [session_directory ...]

   -bysub       This new [01 Feb 2018] option allows you to have 'sessions'
....
....

Press "q" to exit.

To make it easier to type the long container file name, it can be assigned to an environmental variable, CONTAINER, for example:

$ export CONTAINER=/global/software/afni/containers/afni-23.1.10.sif

$ apptainer exec $CONTAINER afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture:         64bit ELF
cpu type:             x86_64
system:               Linux
release:              4.18.0-477.27.1.el8_8.x86_64
version:              #1 SMP Wed Sep 20 15:55:39 UTC 2023
....
....

The variable will persist in your session and can be re-used for other commands.