-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
77 lines (69 loc) · 2.11 KB
/
Copy pathDockerfile
File metadata and controls
77 lines (69 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM andrewosh/binder-base
MAINTAINER mansourjohn@gmail.com
USER root
# install things
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
bash-completion \
build-essential \
git \
python \
python-dev \
petsc-dev \
libhdf5-dev \
python-pip \
libxml2-dev \
xorg-dev \
ssh \
curl \
libfreetype6-dev \
libpng12-dev \
libxft-dev \
xvfb \
freeglut3 \
freeglut3-dev \
libgl1-mesa-dri \
libgl1-mesa-glx \
rsync \
vim \
less \
xauth \
swig && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
pip install \
numpy \
jupyter \
plotly \
mpi4py \
matplotlib \
runipy
# script for xvfb-run. all docker commands will effectively run under this via the entrypoint
RUN printf "#\041/bin/sh \n rm -f /tmp/.X99-lock && xvfb-run -s '-screen 0 1600x1200x16' \$@" >> /usr/local/bin/xvfbrun.sh && \
chmod +x /usr/local/bin/xvfbrun.sh
# setup environment
ENV PYTHONPATH $PYTHONPATH:$HOME/underworld2
USER main
WORKDIR $HOME
# get underworld, compile, delete some unnecessary files, run tests.
RUN git clone https://github.com/underworldcode/underworld2 && \
cd underworld2/libUnderworld && \
./configure.py --hdf5-dir=/usr/lib/x86_64-linux-gnu/hdf5/serial/ && \
./scons.py && \
cd libUnderworldPy && \
./swigall.py && \
cd .. && \
./scons.py && \
rm .sconsign.dblite && \
rm -fr .sconf_temp && \
cd build && \
rm -fr libUnderworldPy && \
rm -fr StGermain && \
rm -fr gLucifer && \
rm -fr Underworld && \
rm -fr StgFEM && \
rm -fr StgDomain && \
rm -fr PICellerator && \
rm -fr Solvers
# note we also use xvfb which is required for viz
ENTRYPOINT ["xvfbrun.sh"]