Skip to content

Commit

Permalink
First apptainer .def file
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jun 14, 2024
1 parent c997368 commit 5c3a58c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/apptainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Install Fluidsim from source in a Apptainer container

## Build the image locally on a node

```sh
apptainer build image-fluidsim.sif image-fluidsim.def
```

## Run the image to install Fluidsim from source

From the host:

```sh
mkdir -p ~/apptainer_dir/home
apptainer shell --no-home image-fluidsim.sif
```

From the container:

```sh
export HOME=$HOME/apptainer_dir/home
```
27 changes: 27 additions & 0 deletions doc/apptainer/image-fluidsim.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
BootStrap: docker
From: python:3.11

%post
apt-get -y update
apt-get -y install mercurial git less meld

apt-get install -y --no-install-recommends \
libfftw3-dev libfftw3-mpi-dev openmpi-bin libhdf5-openmpi-dev libopenblas-dev

export PATH=/root/.local/bin:$PATH
python -m pip install pipx

pipx install mercurial
pipx inject mercurial hg-git hg-evolve hg-fluiddyn

pipx install pdm
pipx install nox

%environment
export LC_ALL=C
export PATH=/root/.local/bin:$PATH

# %runscript

%labels
Author Pierre Augier

0 comments on commit 5c3a58c

Please sign in to comment.