Skip to content

Commit d35c1e6

Browse files
committed
first step in docker
1 parent deee9a6 commit d35c1e6

10 files changed

+336
-1
lines changed

docker/Dockerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM ubuntu:latest
2+
LABEL maintainer="[email protected]"
3+
4+
RUN export DEBIAN_FRONTEND=noninteractive \
5+
&& export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 \
6+
&& apt update \
7+
&& apt-get upgrade -y \
8+
&& apt-get install -y git \
9+
&& apt-get install -y mpich\
10+
&& apt-get install -y cmake\
11+
&& apt-get install -y python3\
12+
&& apt-get install -y python3-pip\
13+
&& pip3 install numpy
14+
15+
ARG TELEMAC_DIR="/telemac"
16+
17+
RUN mkdir ${TELEMAC_DIR}
18+
COPY install_telemac.sh ${TELEMAC_DIR}/
19+
COPY pysource.reos.sh ${TELEMAC_DIR}/
20+
COPY systel.reos-ubuntu.cfg ${TELEMAC_DIR}/
21+
COPY ./dependencies/metis-5.1.0.tar.gz ${TELEMAC_DIR}/
22+
RUN chmod +x ${TELEMAC_DIR}/install_telemac.sh
23+
RUN cd ${TELEMAC_DIR} \
24+
&& ./install_telemac.sh
25+
26+
COPY build_gmsh.sh /
27+
RUN chmod +x /build_gmsh.sh
28+
RUN ./build_gmsh.sh
29+
30+
COPY build_qgis.sh /
31+
RUN chmod +x /build_qgis.sh
32+
RUN ./build_qgis.sh
33+

docker/Dockerfile_2

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM lekan
2+
3+
COPY build_gmsh.sh /
4+
RUN chmod +x /build_gmsh.sh
5+
RUN ./build_gmsh.sh

docker/Dockerfile_3

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM lekan2
2+
3+
COPY build_qgis.sh /
4+
RUN chmod +x /build_qgis.sh
5+
RUN ./build_qgis.sh

docker/build_gmsh.sh

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
2+
git clone https://gitlab.onelab.info/gmsh/gmsh.git
3+
4+
cd gmsh
5+
git checkout tags/gmsh_4_11_1
6+
GMSH_SRC=$PWD
7+
cd ..
8+
9+
GMSH_INSTALL="/GMSH_Built"
10+
11+
mkdir gmsh_building
12+
cd gmsh_building
13+
14+
$gmsh_building_path=$PWD
15+
16+
cmake -S $GMSH_SRC \
17+
-B . \
18+
-DCMAKE_BUILD_TYPE:STRING=Release \
19+
-DCMAKE_INSTALL_PREFIX:PATH=$GMSH_INSTALL \
20+
-DENABLE_3M:BOOL=OFF \
21+
-DENABLE_ALGLIB:BOOL=OFF \
22+
-DENABLE_ANN:BOOL=OFF \
23+
-DENABLE_BAMG:BOOL=ON \
24+
-DENABLE_BLAS_LAPACK:BOOL=OFF \
25+
-DENABLE_BLOSSOM:BOOL=OFF \
26+
-DENABLE_BUILD_ANDROID:BOOL=OFF \
27+
-DENABLE_BUILD_DYNAMIC:BOOL=ON \
28+
-DENABLE_BUILD_IOS:BOOL=OFF \
29+
-DENABLE_BUILD_LIB:BOOL=OFF \
30+
-DENABLE_BUILD_SHARED:BOOL=OFF \
31+
-DENABLE_CAIRO:BOOL=OFF \
32+
-DENABLE_CGNS:BOOL=OFF \
33+
-DENABLE_CGNS_CPEX0045:BOOL=OFF \
34+
-DENABLE_DINTEGRATION:BOOL=OFF \
35+
-DENABLE_DOMHEX:BOOL=OFF \
36+
-DENABLE_EIGEN:BOOL=ON \
37+
-DENABLE_FLTK:BOOL=OFF \
38+
-DENABLE_GEOMETRYCENTRAL:BOOL=OFF \
39+
-DENABLE_GETDP:BOOL=OFF \
40+
-DENABLE_GMM:BOOL=OFF \
41+
-DENABLE_GMP:BOOL=OFF \
42+
-DENABLE_GRAPHICS:BOOL=OFF \
43+
-DENABLE_HXT:BOOL=OFF \
44+
-DENABLE_KBIPACK:BOOL=OFF \
45+
-DENABLE_MATHEX:BOOL=OFF \
46+
-DENABLE_MED:BOOL=OFF \
47+
-DENABLE_MESH:BOOL=ON \
48+
-DENABLE_METIS:BOOL=OFF \
49+
-DENABLE_MMG:BOOL=OFF \
50+
-DENABLE_MPEG_ENCODE:BOOL=OFF \
51+
-DENABLE_MPI:BOOL=OFF \
52+
-DENABLE_MSVC_STATIC_RUNTIME:BOOL=OFF \
53+
-DENABLE_MUMPS:BOOL=OFF \
54+
-DENABLE_NCURSES:BOOL=OFF \
55+
-DENABLE_NETGEN:BOOL=OFF \
56+
-DENABLE_NUMPY:BOOL=OFF \
57+
-DENABLE_OCC:BOOL=OFF \
58+
-DENABLE_OCC_CAF:BOOL=OFF \
59+
-DENABLE_OCC_STATIC:BOOL=OFF \
60+
-DENABLE_OCC_TBB:BOOL=OFF \
61+
-DENABLE_ONELAB:BOOL=OFF \
62+
-DENABLE_ONELAB_METAMODEL:BOOL=OFF \
63+
-DENABLE_OPENACC:BOOL=OFF \
64+
-DENABLE_OPENMP:BOOL=OFF \
65+
-DENABLE_OPTHOM:BOOL=OFF \
66+
-DENABLE_OSMESA:BOOL=OFF \
67+
-DENABLE_OS_SPECIFIC_INSTALL:BOOL=OFF \
68+
-DENABLE_P4EST:BOOL=OFF \
69+
-DENABLE_PACKAGE_STRIP:BOOL=OFF \
70+
-DENABLE_PARSER:BOOL=OFF \
71+
-DENABLE_PETSC:BOOL=OFF \
72+
-DENABLE_PETSC4PY:BOOL=OFF \
73+
-DENABLE_PLUGINS:BOOL=OFF \
74+
-DENABLE_POPPLER:BOOL=OFF \
75+
-DENABLE_POST:BOOL=OFF \
76+
-DENABLE_PRIVATE_API:BOOL=OFF \
77+
-DENABLE_PRO:BOOL=OFF \
78+
-DENABLE_PROFILE:BOOL=OFF \
79+
-DENABLE_QUADMESHINGTOOLS:BOOL=OFF \
80+
-DENABLE_QUADTRI:BOOL=OFF \
81+
-DENABLE_REVOROPT:BOOL=OFF \
82+
-DENABLE_RPATH:BOOL=OFF \
83+
-DENABLE_SLEPC:BOOL=OFF \
84+
-DENABLE_SOLVER:BOOL=OFF \
85+
-DENABLE_SYSTEM_CONTRIB:BOOL=OFF \
86+
-DENABLE_TCMALLOC:BOOL=OFF \
87+
-DENABLE_TESTS:BOOL=OFF \
88+
-DENABLE_TOUCHBAR:BOOL=OFF \
89+
-DENABLE_VISUDEV:BOOL=OFF \
90+
-DENABLE_VOROPP:BOOL=OFF \
91+
-DENABLE_WINSLOWUNTANGLER:BOOL=OFF \
92+
-DENABLE_WRAP_JAVA:BOOL=OFF \
93+
-DENABLE_WRAP_PYTHON:BOOL=OFF \
94+
-DENABLE_ZIPPER:BOOL=OFF
95+
96+
cmake --build . --config Release -j
97+
cmake --install .
98+
99+
100+
rm -r $gmsh_building_path
101+
rm -r $GMSH_SRC

docker/build_qgis.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
export DEBIAN_FRONTEND=noninteractive
2+
3+
apt-get -y install bison build-essential ca-certificates ccache cmake cmake-curses-gui dh-python doxygen expect flex flip gdal-bin git graphviz grass-dev libexiv2-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl-dev libpdal-dev libpq-dev libproj-dev libprotobuf-dev libqca-qt5-2-dev libqca-qt5-2-plugins libqscintilla2-qt5-dev libqt5opengl5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5webkit5-dev libqt5xmlpatterns5-dev libqwt-qt5-dev libspatialindex-dev libspatialite-dev libsqlite3-dev libsqlite3-mod-spatialite libyaml-tiny-perl libzip-dev libzstd-dev lighttpd locales ninja-build ocl-icd-opencl-dev opencl-headers pandoc pdal pkg-config poppler-utils protobuf-compiler pyqt5-dev pyqt5-dev-tools pyqt5.qsci-dev python3-all-dev python3-autopep8 python3-dev python3-gdal python3-jinja2 python3-lxml python3-mock python3-nose2 python3-owslib python3-plotly python3-psycopg2 python3-pygments python3-pyproj python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtmultimedia python3-pyqt5.qtpositioning python3-pyqt5.qtsql python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-pyqtbuild python3-sip python3-termcolor python3-yaml qt3d-assimpsceneimport-plugin qt3d-defaultgeometryloader-plugin qt3d-gltfsceneio-plugin qt3d-scene2d-plugin qt3d5-dev qtbase5-dev qtbase5-private-dev qtkeychain-qt5-dev qtmultimedia5-dev qtpositioning5-dev qttools5-dev qttools5-dev-tools sip-tools spawn-fcgi xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb
4+
5+
git clone https://github.com/vcloarec/QGIS.git
6+
cd QGIS
7+
git checkout forLekanMaster
8+
cd ..
9+
10+
mkdir QGIS_building
11+
mkdir QGIS_built
12+
13+
cd QGIS_building
14+
15+
cmake -S $env:QGIS_SRC \
16+
-B . \
17+
-D WITH_QSPATIALITE=TRUE \
18+
-D WITH_SERVER=FALSE \
19+
-D SERVER_SKIP_ECW=TRUE \
20+
-D WITH_3D=TRUE \
21+
-D WITH_PDAL=FALSE \
22+
-D WITH_HANA=FALSE \
23+
-D WITH_GRASS=FALSE \
24+
-D WITH_GRASS7=FALSE \
25+
-D WITH_BINDINGS=TRUE \
26+
-D WITH_ORACLE=FALSE \
27+
-D WITH_CUSTOM_WIDGETS=FALSE \
28+
-D WITH_QTWEBKIT=FALSE \
29+
-D WITH_PY_COMPILE=FALSE \
30+
-D ENABLE_TESTS=FALSE \
31+
-D CMAKE_BUILD_TYPE=$BUILDCONF \
32+
-D CMAKE_CONFIGURATION_TYPES=$BUILDCONF \
33+
-D Qt5_DIR=$OSGEO_DIR/apps/qt5/lib/cmake/Qt5 \
34+
-D CMAKE_INSTALL_PREFIX=$env:QGIS_BUILT \
35+
-D CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=TRUE \
36+
37+
cmake --build . --config Release -j
38+
cmake --install .
39+
40+
cd ..
41+
rm -r QGIS_building
4.76 MB
Binary file not shown.

docker/install_telemac.sh

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
if [ -z "$1" ]; then
4+
telemac_dir=$PWD
5+
else
6+
telemac_dir=$1
7+
fi
8+
9+
export HOMETEL=$telemac_dir/telemac_home
10+
11+
echo "TELEMAC will be installed in the directory $HOMETEL"
12+
source pysource.reos.sh
13+
14+
cd $telemac_dir
15+
16+
echo "Build and install metis"
17+
if [ ! -d "metis" ] ; then
18+
gunzip -d -k metis-5.1.0.tar.gz
19+
tar -xvf metis-5.1.0.tar
20+
cd metis-5.1.0
21+
cmake -D CMAKE_INSTALL_PREFIX="$telemac_dir/metis/"
22+
make
23+
make install
24+
cd ..
25+
rm -r metis-5.1.0
26+
rm metis-5.1.0.tar
27+
fi
28+
29+
echo "Clone telemac"
30+
if [ ! -d $HOMETEL ] ; then
31+
git clone https://gitlab.pam-retd.fr/otm/telemac-mascaret.git $HOMETEL
32+
fi
33+
34+
cd $HOMETEL
35+
git checkout tags/v8p4r0
36+
cd ..
37+
38+
echo "Build telemac"
39+
python3 $HOMETEL/scripts/python3/compile_telemac.py
40+
41+

docker/pysource.reos.sh

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This file is a template for a Linux environment file
2+
# running "source pysource.template.sh" will position all
3+
# the necessary environment variables for telemac
4+
# To adapt to your installation replace word <word> by their local value
5+
###
6+
### TELEMAC settings -----------------------------------------------------------
7+
###
8+
# Path to telemac root dir
9+
export HOMETEL=$HOMETEL
10+
# Adding python scripts to PATH
11+
export PATH=$HOMETEL/scripts/python3:.:$PATH
12+
# Configuration file
13+
export SYSTELCFG=$PWD/systel.reos-ubuntu.cfg
14+
# Name of the configuration to use
15+
export USETELCFG=reos_ubuntu
16+
# Path to this file
17+
export SOURCEFILE=$PWD/pysource.reos.sh
18+
### Python
19+
# To force python to flush its output
20+
export PYTHONUNBUFFERED='true'
21+
### API
22+
export PYTHONPATH=$HOMETEL/scripts/python3:$PYTHONPATH
23+
export LD_LIBRARY_PATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$LD_LIBRARY_PATH
24+
export PYTHONPATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$PYTHONPATH
25+
###
26+
### COMPILERS -----------------------------------------------------------
27+
###
28+
# Here are a few examples for external libraries
29+
#export SYSTEL=/data/projets/projets.002/systel.002
30+
31+
### MPI -----------------------------------------------------------
32+
#export MPIHOME=$SYSTEL/LIBRARY/mpi/ifort.10.1.008
33+
#export PATH=$MPIHOME/bin:$PATH
34+
#export LD_LIBRARY_PATH=$MPIHOME/lib:$LD_LIBRARY_PATH
35+
###
36+
### EXTERNAL LIBRARIES -----------------------------------------------------------
37+
###
38+
### HDF5 -----------------------------------------------------------
39+
#export HDF5HOME=$SYSTEL/LIBRARY/hdf5-1.8.14/arch/C9
40+
#export LD_LIBRARY_PATH=$HDF5HOME/lib:$LD_LIBRARY_PATH
41+
#export LD_RUN_PATH=$HDF5HOME/lib:$MEDHOME/lib:$LD_RUN_PATH
42+
### MED -----------------------------------------------------------
43+
#export MEDHOME=$SYSTEL/LIBRARY/med-3.2.0/arch/C9
44+
#export LD_LIBRARY_PATH=$MEDHOME/lib:$LD_LIBRARY_PATH
45+
#export PATH=$MEDHOME/bin:$PATH
46+
### MUMPS -------------------------------------------------------------
47+
#export MUMPSHOME=$SYSTEL/LIBRARY/mumps/gnu
48+
#export SCALAPACKHOME=$SYSTEL/LIBRARY/scalapack/gnu
49+
#export BLACSHOME=$SYSTEL/LIBRARY/blacs/gnu
50+
### METIS -------------------------------------------------------------
51+
#export METISHOME=$SYSTEL/LIBRARY/metis-5.1.0/arch/C9
52+
#export LD_LIBRARY_PATH=$METISHOME/lib:$LD_LIBRARY_PATH

docker/systel.reos-ubuntu.cfg

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# _____ _______________________________
2+
# ____/ TELEMAC Project Definitions /______________________________/
3+
#
4+
# space delimited list of active configurations
5+
#
6+
[Configurations]
7+
configs: reos_ubuntu
8+
#
9+
# _____ ___________________________________________________
10+
# ____/ GENERAL /__________________________________________________/
11+
[general]
12+
modules: system
13+
#
14+
cmd_lib: ar cru <libname> <objs>
15+
#
16+
mods_all: -I <config>
17+
#
18+
sfx_zip: .gztar
19+
sfx_lib: .a
20+
sfx_obj: .o
21+
sfx_mod: .mod
22+
sfx_exe:
23+
#
24+
val_root: <root>/examples
25+
val_rank: all
26+
# also possible val_rank: <3 >7 6
27+
cmd_obj_c: gcc -c <srcName> -o <objName>
28+
#
29+
# _____ ____________________________________
30+
# ____/ Ubuntu gfortran mpich2 /___________________________________/
31+
[reos_ubuntu]
32+
#
33+
brief: parallel mode, using mpiexec directly (of the MPICH2 package).
34+
The only difference with the scalar versions (debugged) is the presence
35+
of the key mpi_cmdexec and the -DHAVE_MPI compilation directive.
36+
Of course, you also need the key par_cmdexec.
37+
Finally, note that this configuration also works whether
38+
processor is 0 or 1.
39+
#
40+
options: hermes_only
41+
#
42+
f2py_name: f2py3
43+
pyd_fcompiler: gfortran
44+
#
45+
mpi_cmdexec: /usr/bin/mpiexec -wdir <wdir> -n <ncsize> <exename>
46+
#
47+
#cmd_obj: gfortran -c -cpp -g -fbounds-check -Wall -fbacktrace -finit-real=nan -DHAVE_MPI -fconvert=big-endian -frecord-marker=4 <mods> <incs> <f95name>
48+
#cmd_exe: /usr/bin/mpif90 -fconvert=big-endian -frecord-marker=4 -v -lm -o <exename> <objs> <libs>
49+
#
50+
cmd_obj: mpif90 -c -g -cpp -DHAVE_MPI -fconvert=big-endian -frecord-marker=4 <mods> <incs> <f95name>
51+
cmd_exe: mpif90 -fconvert=big-endian -frecord-marker=4 -lm -o <exename> <objs> <libs>
52+
#
53+
#incs_all: -I /usr/lib/x86_64-linux-gnu/mpich/include/
54+
incs_all:
55+
libs_all: ${TELEMAC_DIR}/metis/lib/libmetis.a
56+
# _____ ________________________________________
57+
# ____/ End of Definitions /_______________________________________/

windows/load_build_gmsh.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $starter_path = Get-Location
33
git clone https://gitlab.onelab.info/gmsh/gmsh.git
44

55
cd gmsh
6-
git checkout tags/gmsh_4_11_0
6+
git checkout tags/gmsh_4_11_1
77
cd ..
88

99
$GMSH_SRC = Join-Path $starter_path gmsh

0 commit comments

Comments
 (0)