Installing AFNI Within a Conda Environment

As a sysadmin at a university institution, I often find that software installation requests from research groups are a fairly common occurrence for scientific computing groups like mine. I often dislike the gatekeeper role that this puts me in, since I’d rather give groups the flexibility to try out new software without needing a middleman, and I often feel as though such software installations take time away from the other (sometimes urgent) infrastructure projects my group has.

The conda package manager seems to be a nice way for researchers to both keep track of their computing environments (library versions used, etc) and also self-provision without needing the much-coveted rootly powers of the sysadmin. Although primarily known for its Python packages, it also apparently gives researchers the ability to download packages written in other languages (e.g., you can download and install the entire gcc toolchain within a conda environment) without acting upon system-level tools and libraries. This is very appealing to me, since it prevents people from potentially compromising operating system stability (e.g., the giving researchers root route) while also empowering them to try out new (or updated) tools.

I recently noticed that a lot of the pre-requisites for AFNI (which all require sudo privileges, and are listed here) are also available in conda-forge (i.e., the tcsh, xorg-libxp, openmotif, gsl, xorg-fontsproto, pyqt, firefox, and netpbm packages). Has AFNI ever been tested within a conda environment? Would it be feasible for researchers to run it in such a way?

Relatedly is there a minimal subset of the dependencies listed in the AFNI installation instructions that can be installed for headless clusters or are the dependencies listed (like Eye of Gnome, Nautilus and Firefox) always necessary?

–John

I think that I answered my own question (at least partially). Apparently someone at the University of Nebraska Lincoln put together a conda recipe to build afni 18.2.06 here. I’m not sure if all functionality fully works though, since some dependencies (such as the aforementioned Nautilus and EoG) seem to be missing in the recipe.

On a related note, would there any interest in making conda a semi-official installation method for AFNI? I feel like it could also go a long way towards resolving issues like this more readily.

Agreed. Conda is an ideal tool for this sort of thing. The HCC version is the best option for now. There’s no need to worry about system packages like eog and nautilus (whatever you use on your cluster/server is fine).

Regarding a more official version of conda packaging, I am working on this. I hope to have it ready soon. There are a lot of bits and pieces to take into account but I am almost there.

Also, if your users are comfortable with singularity that is a solution worth considering. For each release of AFNI a docker image is pushed to docker-hub. The directory /home/afni_user/work can be written to inside the container. An unprivileged user would make use of this with something along the lines of

singularity pull docker://afni/afni_cmake_build
singularity run -B /data/$USER/workdir:/home/afni_user/work --cleanenv  afni_cmake_build_latest.sif