ULG227G2VMOOSDSKHY36QQQGEABGXZIX2B3JA4YIBS6HCVDVJ7IAC
6CTEXMHONBALJHRGMTFGBQDHZJXZ5NTVUET4G53LX65LGLLHHY2AC
INF7NFKN5YDXL75PV3A7PC24BBEHXIWE6AE7O343YCUMGXI7RXPAC
HNQLJR6ZWME6VBJ2Y7PSENLJPXC7INSS7NC2CKIWQAC776CQ74TQC
WKFYNYHZIPPSDL7K35JYHUFT7KPHDBPXCDYAM3LYKI45Y43KEQGAC
FLMRWNIHKDGXOZLRHHKJWS34SRWPHS4B4EWT7TMADTDW723WNKFAC
3XLFLKJLZY5ZTMDJVGBBIFXIL7ZFHBYZCURJCVJJORFOIKNQ475AC
4UR7OFQ22ZNWHO7PFJXCDO7UCTO332DCADQYCXAL7UVZXBV3NJOQC
TVOV5NTD4HC6I2KNV3EEIP4UE7R4PJ5DSNVTQNG5AHVHS56V4GOQC
V2ZGLFROKXU3IENIS6PVLJ7RUD43KKHFGQE7MB4WCBWZRFYP3YIAC
X7I5BT5HH5WJCDDXK6OK6MIQ3NXGMYATWCF2DL7URQ7FCL6BH4TAC
24OEXXQPHUU75KYGALGSXB2YPCE3MJ5ZDAQXFREAG4ZVWCYD4UNQC
LWYWOOIQMLDZGDMW2X6IRGIPUZ37DQYR5J2NZP3HPOIASXTFQTEAC
AE3YOROVCGVSU2XIP7R5QC6K2JZCHZNNX5JLVWVKVGJ3JB5GQEQAC
EEGCHA6VMRPBJ3F4OVK7RLFKXU4V42JSW2GGYXELQWO2D2EU56AQC
76CQRK25D2SCZW32CPHSXFST7LFEUFLR4JDX7567DPEIOVU76AEAC
GXQMQJ4TCD5WRIB3RSRKZQRQQW7RMQ2ONBOOEZAHEADMJLLTQRSQC
EXAPMKUYR36VDHW6MX4IOR72QCW4UUJGAEAM43IJK7ZBI3FSC5VQC
# Use Ubuntu
FROM ubuntu:19.04
# Add user "cactus" with sudo privileges
RUN apt-get update && apt-get -y install sudo && rm -rf /var/lib/apt/lists/*
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
# Don't use /home since this can lead to ambiguities with Singularity
RUN useradd -G sudo -m -s /bin/bash -d /cactus cactus
USER cactus
WORKDIR /cactus
# Install system packages
RUN sudo apt-get update && sudo apt-get -y install build-essential g++ gfortran libopenmpi-dev perl pkg-config python wget && sudo rm -rf /var/lib/apt/lists/*
# Install cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.tar.gz && sudo tar xzf cmake-3.14.5-Linux-x86_64.tar.gz -C /usr/local --strip-components=1
# Build AMReX
RUN wget https://github.com/AMReX-Codes/amrex/archive/19.07.tar.gz && tar xzf 19.07.tar.gz && cd amrex-19.07 && mkdir build && cd build && cmake -DENABLE_OMP=ON -DCMAKE_INSTALL_PREFIX=/cactus/amrex .. && make -j2 && make -j2 install
# Set up Simfactory
RUN echo 'docker' >$HOME/.hostname && mkdir /cactus/simulations
COPY defs.local.ini /cactus/defs.local.ini
COPY docker.ini /cactus/docker.ini
COPY ubuntu.cfg /cactus/ubuntu.cfg
COPY docker.sub /cactus/docker.sub
COPY docker.run /cactus/docker.run
COPY amrex.th /cactus/amrex.th
# As documentation
COPY Dockerfile /Dockerfile
# How to build the Docker image
```sh
docker build . --tag eschnett/cactus-amrex
docker push eschnett/cactus-amrex
```
# Ubuntu's libhwloc-dev is broken; see
# <https://trac.einsteintoolkit.org/ticket/1717>.
# You need to add the libnuma-dev libltdl-dev packages to use the
# system hwloc package and prevent this bug.
# On the other hand you must NOT install libnuma-dev unless you also
# install libhwloc-dev and libtldl-dev.
AMREX_DIR = /cactus/amrex
- script: |
set -euxo pipefail
sudo apt install gfortran libopenmpi-dev
gcc --version
g++ --version
gfortran --version
mpirun --version
displayName: Install system packages
- script: |
set -euxo pipefail
wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.tar.gz
tar xzf cmake-3.14.5-Linux-x86_64.tar.gz
export PATH="$(pwd)/cmake-3.14.5-Linux-x86_64/bin:$PATH"
cmake --version
displayName: Install cmake
# - script: |
# set -euxo pipefail
# sudo apt install gfortran libopenmpi-dev
# gcc --version
# g++ --version
# gfortran --version
# mpirun --version
# displayName: Install system packages
# - script: |
# set -euxo pipefail
# wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.tar.gz
# tar xzf cmake-3.14.5-Linux-x86_64.tar.gz
# export PATH="$(pwd)/cmake-3.14.5-Linux-x86_64/bin:$PATH"
# cmake --version
# displayName: Install cmake
# - script: |
# set -euxo pipefail
# export PATH="$(pwd)/cmake-3.14.5-Linux-x86_64/bin:$PATH"
# wget https://github.com/AMReX-Codes/amrex/archive/19.07.tar.gz
# tar xzf 19.07.tar.gz
# cd amrex-19.07
# mkdir build
# cd build
# cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran -DENABLE_OMP=ON -DCMAKE_INSTALL_PREFIX=$HOME/amrex ..
# make -j2
# make -j2 install
# export AMREX_DIR=$HOME/amrex
# displayName: Install AMReX
wget https://github.com/AMReX-Codes/amrex/archive/19.07.tar.gz
tar xzf 19.07.tar.gz
cd amrex-19.07
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran -DENABLE_OMP=ON -DCMAKE_INSTALL_PREFIX=$HOME/amrex ..
make -j2
make -j2 install