From 44cf5809ad7c07049c5d1f70900d2151b455d14a Mon Sep 17 00:00:00 2001 From: Iago Bonnici <iago.bonnici@umontpellier.fr> Date: Mon, 19 Jun 2023 14:49:01 +0200 Subject: [PATCH] Document container installation in README. --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/README.md b/README.md index 236341a..ba363b1 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,69 @@ following its specifications within Nicolas Galtier's draft paper *Phylogenetic conflicts: distinguishing gene flow from incomplete lineage sorting* (2023), and the original C code. + +## Build instructions + +### With Apptainer/Singularity + +Aphid can be run from an apptainer +provided you have [Apptainer] (aka. Singularity) installed. + +First, build the container image as root: + +```sh +# Get definition file. +curl -L \ + https://gitlab.mbb.univ-montp2.fr/ibonnici/aphid/-/jobs/artifacts/main/raw/singularity.def?job=container-recipes \ + > aphid.def # (or download by hand) + +# Build image. +sudo apptainer build aphid.sif aphid.def +``` + +Then run the container as regular user: + +```sh +./aphid.sif <my_input_files> +``` + +### With Docker + +Aphid can be run from a docker container, +provided you have [Docker] installed. + +First, build the container image: +```sh +docker buildx build -t aphid \ + https://gitlab.mbb.univ-montp2.fr/ibonnici/aphid/-/jobs/artifacts/main/raw/Dockerfile?job=container-recipes +``` + +Then run the container: +```sh +docker run --rm -it -v ${PWD}:/home/aphid aphid <my_input_files> +``` + + +### Manual compilation + +The program is still fairly easy to compile yet, +provided you have [git] and [gcc] installed. + +First clone and compile the project: + +```sh +git clone --recursive https://gitlab.mbb.univ-montp2.fr/ibonnici/aphid/ +cd aphid +gcc -lm aphid.*.c -o aphid +``` + +Then run the binary obtained: + +```sh +./aphid <my_input_files> +``` + +[Apptainer]: https://apptainer.org/ +[Docker]: https://www.docker.com/ +[git]: https://git-scm.com/ +[gcc]: https://gcc.gnu.org/ -- GitLab