Skip to content

Commit

Permalink
Added Dockerfile example and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfgc committed Nov 1, 2019
1 parent 5fd0df6 commit d42adc9
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 6 deletions.
10 changes: 7 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ ADIOS 2 focuses on:

In addition, ADIOS 2 APIs are based on:

* **MPI** ADIOS 2 is MPI-based, it can be used in non-MPI serial code.
* **MPI** ADIOS 2 is MPI-based, it can be used in non-MPI serial code. Non-MPI 100% serial build is optional.

* **Data Groups** ADIOS 2 favors a deferred/prefetch/grouped variables transport mode by default to maximize data-per-request ratios. Sync mode, one variable at a time, is treated as the special case.

* **Data Steps** ADIOS 2 follow the actual production/consumption of data using an “steps” abstraction removing the need to manage extra indexing information.
* **Data Steps** ADIOS 2 follows the actual production/consumption of data using an I/O “steps” abstraction removing the need to manage extra indexing information.

* **Data Engines** ADIOS 2 Engine abstraction allows for reusing the APIs for different transport modes removing the need for drastic code changes.

Expand All @@ -53,7 +53,11 @@ Please find [The ADIOS 2 User Guide at readthedocs](https://adios2.readthedocs.i
* Spack: [adios2 package](https://spack.readthedocs.io/en/latest/package_list.html#adios2)


Once ADIOS 2 is installed refer to:
* Docker images:
* Ubuntu 18.04: under [scripts/docker/images/ubuntu18.04/Dockerfile](https://github.com/ornladios/ADIOS2/tree/master/scripts/docker/images/ubuntu18.04/Dockerfile)


Once ADIOS 2 is installed refer to:

* [Linking ADIOS 2](https://adios2.readthedocs.io/en/latest/setting_up/setting_up.html#linking-adios-2)

Expand Down
15 changes: 12 additions & 3 deletions docs/user_guide/source/setting_up/package.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################
Package Managers
################
##########
As Package
##########

*****
Conda
Expand All @@ -17,3 +17,12 @@ Spack
*****

ADIOS 2 is fully supported in the latest Spack `adios2 package <https://spack.readthedocs.io/en/latest/package_list.html#adios2>`_


******
Docker
******

Docker images including building and installation of ADIOS 2 in a container:
* Ubuntu 18.04: under `scripts/docker/images/ubuntu18.04/Dockerfile <https://github.com/ornladios/ADIOS2/tree/master/scripts/docker/images/ubuntu18.04/Dockerfile>`_

83 changes: 83 additions & 0 deletions scripts/docker/images/ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Dockerfile for ADIOS2 on Ubuntu 18.04
#####################################################################################################
#
# This is an example Dockerfile image to build and install adios2 master from source in Ubuntu 18.04
# including dependencies from apt-get and (optionally) the gray-scott tutorial example at the end of
# this file
# Modify at your convenience
# Usage ($ is your terminal prompt):
# 1) build docker image
# $ cd ADIOS2/scripts/docker/images/ubuntu18.04 ; docker build .
# or:
# $ docker build -f /path/to/ADIOS2/scripts/docker/images/ubuntu18.04/Dockerfile .
# add a tag:
# $ docker build -f /path/to/ADIOS2/scripts/docker/images/ubuntu18.04/Dockerfile -t adios2/master
# 2) run the built image in a container
# $ docker run -i -t ubuntu:18.04 /bin/bash
# or with tag:
# $ docker run -i -t adios2/master /bin/bash
#####################################################################################################

FROM ubuntu:18.04
MAINTAINER William F Godoy [email protected]
RUN apt-get update -y &&\
apt-get install build-essential sudo gfortran \
openmpi-bin libopenmpi-dev libzmq3-dev \
python3-dev python3-mpi4py python3-numpy python3-pip \
libblosc-dev libbz2-dev libpng-dev \
libhdf5-openmpi-dev \
cmake \
git vim \
-y

RUN cd /tmp &&\
mkdir -p Software

RUN cd /tmp/Software &&\
git clone https://github.com/LLNL/zfp.git --single-branch --branch 0.5.5 --depth 1 &&\
mkdir -p zfp-build &&\
cd zfp-build &&\
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/zfp -DBUILD_EXAMPLES=OFF ../zfp &&\
make -j &&\
make install

RUN cd /tmp/Software &&\
git clone https://github.com/disheng222/SZ.git --single-branch --branch v2.1.5.0 --depth 1 &&\
cd SZ &&\
./configure --prefix=/opt/sz &&\
make -j &&\
make install

RUN cd /tmp/Software &&\
git clone https://github.com/ornladios/ADIOS2.git --single-branch --branch master --depth 1 &&\
mkdir -p ADIOS2-build &&\
cd ADIOS2-build &&\
cmake -DCMAKE_INSTALL_PREFIX=/opt/adios2 \
-DZFP_ROOT=/opt/zfp \
-DSZ_ROOT=/opt/sz \
-DADIOS2_BUILD_TESTING=OFF \
-DADIOS2_BUILD_EXAMPLES=OFF \
../ADIOS2 &&\
make -j &&\
make install

RUN cd /tmp &&\
rm -fr Software

ENV PYTHONPATH=/usr/local/lib/python3.6/site-packages/:/opt/adios2/lib/python3.6/site-packages
ENV PATH=/opt/adios2/bin
ENV LD_LIBRARY_PATH=/usr/local/lib:/opt/zfp/lib:/opt/sz/lib:/opt/adios2/lib

# optionally add a new user and start using adios2 with an example
# RUN useradd -m wfg && echo "wfg:wfg" | chpasswd && adduser wfg sudo
# USER wfg
# CMD /bin/bash

# RUN cd ~ &&\
# git clone https://github.com/pnorbert/adiosvm.git --single-branch --branch master --depth 1 &&\
# cd adiosvm/Tutorial/gray-scott &&\
# mkdir -p build &&\
# cd build &&\
# cmake -DCMAKE_BUILD_TYPE=Release .. &&\
# make &&\
# cd ..

0 comments on commit d42adc9

Please sign in to comment.