Commit 274d7de5 authored by frozar's avatar frozar
Browse files

[DOCKER] Add a docker for lmgc and paraview together.

parent a7c2b974
# documentation link:
# Docker to get the latest release of LMGC90
FROM ubuntu:14.04
MAINTAINER Fabien Rozar <>
RUN apt-get update
# Building requierement
RUN apt-get install -y git python cmake gcc g++ gfortran liblapack-dev swig python-dev python-numpy
RUN apt-get install -y python-vtk paraview
# To be able to run paraview without to much error
RUN apt-get install -y dbus-x11
RUN export uid=1001 gid=1001 && \
mkdir -p /home/developer && \
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:${uid}:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown ${uid}:${gid} -R /home/developer
USER developer
ENV HOME /home/developer
# Visualizing requierement
## RUN apt-get install -y python-vtk paraview
# Building documention requierement
## RUN apt-get install -y doxygen graphviz python-numpydoc texlive-latex-extra dvipng imagemagick
# Update the environment
ENV PYTHONPATH /home/developer/wk/lmgc90_user/build:$PYTHONPATH
# Make working directory
RUN mkdir /home/developer/wk
# Download the source of LMGC90
RUN cd /home/developer/wk && git clone
RUN mkdir /home/developer/wk/lmgc90_user/build && cd /home/developer/wk/lmgc90_user/build && cmake ../src && make -j4
# Run an example
RUN cd /home/developer/wk/lmgc90_user/examples/mecaMAILx_2D/Rocking && python > /dev/null
# To be able to run paraview
CMD cd /home/developer/wk/lmgc90_user/examples/mecaMAILx_2D/Rocking && paraview
# Interactive run
## docker run -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -u $(id -u):$(id -g) rozar/lmgc90:paraview
# Building command
## docker build -t rozar/lmgc90:paraview .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment