-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,414 additions
and
999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# Changelog | ||
|
||
## v0.1.1 | ||
|
||
- Fix errno management from Go to C layer [054dd09] | ||
- Add example with IOR benchmark [6e23b41] | ||
- Update README.md [a740d70] | ||
- Add example workflow with HydroC code and ParaView [88b72c1] | ||
- Add a development docker environment [12af2a6] | ||
|
||
## v0.1.0 | ||
|
||
- Hello github ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM golang:1.11.5 | ||
|
||
ENV GO111MODULE=on | ||
|
||
#fetch and build Redis | ||
RUN mkdir -p /tmp/src/redis && \ | ||
wget -O redis.tar.gz http://download.redis.io/releases/redis-5.0.3.tar.gz && \ | ||
tar xf redis.tar.gz --strip-components=1 -C /tmp/src/redis && \ | ||
rm redis.tar.gz && \ | ||
cd /tmp/src/redis && make -j "$(nproc)" install | ||
|
||
RUN rm -rf /tmp/src | ||
|
||
# Switch to non-root user | ||
# replace UID and GID with yours to access your files through a mounted volume | ||
RUN groupadd --gid 1010 dev && \ | ||
useradd --uid 1010 --gid dev dev | ||
|
||
ENV HOME /home/dev | ||
RUN mkdir -p ${HOME} && chown dev ${HOME} | ||
USER dev | ||
WORKDIR ${HOME} | ||
|
||
COPY banner.sh /tmp/ | ||
RUN cat /tmp/banner.sh >> .bashrc | ||
|
||
CMD bash | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
# uncomment to allow stracing in docker (for debug) | ||
#DOCKER_RUN_OPT = --security-opt seccomp:unconfined | ||
|
||
build: | ||
docker build -t pdwfs . | ||
|
||
run: build | ||
docker run $(DOCKER_RUN_OPT) -it --rm -v $(shell pwd)/..:/home/dev/pdwfs -w /home/dev/pdwfs --name pdwfs-dev pdwfs | ||
|
||
clean: | ||
docker rm $(shell docker ps -qa --no-trunc --filter "status=exited"); \ | ||
docker rmi $(shell docker images --filter "dangling=true" -q --no-trunc) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo "*************************************************************" | ||
echo "* Welcome to pdwfs development container *" | ||
echo "* *" | ||
echo "* To build pdwfs: *" | ||
echo "* $ make *" | ||
echo "* *" | ||
echo "* To run the test suite you need a running Redis instance: *" | ||
echo "* $ scripts/pdwfs-redis start *" | ||
echo "* $ make test *" | ||
echo "*************************************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
FROM centos:latest | ||
|
||
RUN yum -y update && yum -y install \ | ||
wget \ | ||
gcc \ | ||
gcc-c++ \ | ||
automake \ | ||
make \ | ||
strace \ | ||
zlib-devel \ | ||
git \ | ||
python-devel; \ | ||
yum clean all | ||
|
||
# Go language | ||
RUN wget -O go.tar.gz 'https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz' && \ | ||
tar xf go.tar.gz -C /usr/local && \ | ||
rm go.tar.gz | ||
|
||
ENV PATH "/usr/local/go/bin:$PATH" | ||
|
||
# OpenMPI | ||
RUN mkdir -p /tmp/src/openmpi && \ | ||
wget -O openmpi.tar.gz 'https://download.open-mpi.org/release/open-mpi/v2.1/openmpi-2.1.6.tar.gz' && \ | ||
tar xf openmpi.tar.gz --strip-components=1 -C /tmp/src/openmpi && \ | ||
rm openmpi.tar.gz && \ | ||
cd /tmp/src/openmpi && \ | ||
./configure --prefix=/usr/local && make -j "$(nproc)" install | ||
|
||
# Redis | ||
RUN mkdir -p /tmp/src/redis && \ | ||
wget -O redis.tar.gz http://download.redis.io/releases/redis-5.0.3.tar.gz && \ | ||
tar xf redis.tar.gz --strip-components=1 -C /tmp/src/redis && \ | ||
rm redis.tar.gz && \ | ||
cd /tmp/src/redis && make PREFIX=/usr/local -j "$(nproc)" install | ||
|
||
RUN rm -rf /tmp/src | ||
|
||
RUN wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py' && \ | ||
python get-pip.py && \ | ||
python -m pip install jupyter matplotlib pandas | ||
|
||
EXPOSE 8888 | ||
|
||
# Switch to non-root user | ||
# replace UID and GID with yours to access your files through a mounted volume | ||
RUN groupadd --gid 1010 rebels && \ | ||
useradd --uid 1010 --gid rebels luke | ||
|
||
USER luke | ||
ENV HOME /home/luke | ||
WORKDIR ${HOME} | ||
|
||
COPY --chown=luke:rebels jupyter_notebook_config.py ${HOME}/.jupyter/ | ||
|
||
CMD bash | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
c = get_config() | ||
c.NotebookApp.ip = '0.0.0.0' | ||
c.NotebookApp.open_browser = False | ||
c.NotebookApp.password = '' | ||
c.NotebookApp.token = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
FROM pdwfs-base | ||
|
||
USER root | ||
|
||
RUN yum -y update; yum -y install numactl-devel; yum clean all | ||
|
||
# Download and install ParaView and FFmpeg in /usr/local | ||
|
||
RUN wget -O ParaView.tar.xz 'https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.6&type=binary&os=Linux&downloadFile=ParaView-5.6.0-osmesa-MPI-Linux-64bit.tar.xz' && \ | ||
mkdir -p /usr/local/ParaView && \ | ||
tar xf ParaView.tar.xz --strip-components=1 -C /usr/local/ParaView && \ | ||
rm ParaView.tar.xz | ||
|
||
ENV PATH "/usr/local/ParaView/bin:$PATH" | ||
|
||
RUN wget -O ffmpeg.tar.xz 'https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz' && \ | ||
tar xf ffmpeg.tar.xz --strip-components=1 -C /usr/local/bin && \ | ||
rm ffmpeg.tar.xz | ||
|
||
|
||
# Clone and build Hydro simulation code and pdwfs in user space | ||
|
||
USER luke | ||
|
||
RUN mkdir -p ${HOME}/src && cd ${HOME}/src && \ | ||
git clone 'https://github.com/JCapul/Hydro' && \ | ||
make -C Hydro/HydroC/HydroC99_2DMpi/Src && \ | ||
install Hydro/HydroC/HydroC99_2DMpi/Src/hydro -D ${HOME}/opt/hydro/bin/hydro | ||
|
||
ENV PATH "${HOME}/opt/hydro/bin:$PATH" | ||
|
||
RUN cd ${HOME}/src && \ | ||
git clone 'https://github.com/cea-hpc/pdwfs' && \ | ||
make -C pdwfs PREFIX=${HOME}/opt/pdwfs install | ||
|
||
ENV PATH "${HOME}/opt/pdwfs/bin:$PATH" | ||
|
||
# uncomment to use pdwfs from a volume mounted on the pdwfs source directory on the host (for debug/development) | ||
# (a modification is needed in the Makefile as well) | ||
#ENV PATH "/pdwfs/build/bin:$PATH" | ||
|
||
COPY banner.sh /tmp/ | ||
RUN cat /tmp/banner.sh >> ${HOME}/.bashrc | ||
|
||
RUN mkdir -p ${HOME}/run | ||
WORKDIR ${HOME}/run | ||
|
||
COPY --chown=luke:rebels paraview_run.py . | ||
COPY --chown=luke:rebels process_all.py . | ||
COPY --chown=luke:rebels hydro_input.nml . | ||
COPY --chown=luke:rebels run_on_disk.sh . | ||
COPY --chown=luke:rebels run_on_pdwfs.sh . | ||
|
||
CMD bash | ||
|
||
|
||
|
Oops, something went wrong.