-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
144 lines (122 loc) · 4.43 KB
/
Dockerfile
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
### contains Gudhi 2.3.0 dockerfile http://gudhi.gforge.inria.fr/dockerfile/
# Image de base
FROM ubuntu:18.04
# Update and upgrade distribution
RUN apt-get update && \
apt-get upgrade -y
# Tools necessary for installing and configuring Ubuntu
RUN apt-get install -y \
apt-utils \
locales \
tzdata
# Timezone
RUN echo "Europe/Paris" | tee /etc/timezone && \
ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
# Locale with UTF-8 support
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && \
locale-gen && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Required for Gudhi compilation
RUN apt-get install -y curl \
make \
cmake \
g++ \
graphviz \
doxygen \
perl \
libboost-all-dev \
libeigen3-dev \
libgmp3-dev \
libmpfr-dev \
libtbb-dev \
locales \
python3 \
python3-pip \
python3-pytest \
python3-tk \
libfreetype6-dev \
pkg-config
RUN apt-get install -y htop \
silversearcher-ag \
sudo \
zip \
unzip
RUN pip3 install \
Cython \
sphinx \
sphinxcontrib-bibtex \
matplotlib \
numpy
RUN pip3 install \
jupyterlab \
scipy \
pandas \
ipywidgets \
ipyvolume \
biopython \
nglview \
npm \
networkx \
graphviz
# apt clean up
RUN apt autoremove && rm -rf /var/lib/apt/lists/*
# # Working directory
WORKDIR /gudhi
RUN curl -LO "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.12.1/CGAL-4.12.1.tar.xz" \
&& tar xf CGAL-4.12.1.tar.xz && cd CGAL-4.12.1 \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_HEADER_ONLY=ON . && make all install && cd .. \
&& curl -LO "https://gforge.inria.fr/frs/download.php/file/37696/2018-09-04-14-25-00_GUDHI_2.3.0.tar.gz" \
&& tar xf 2018-09-04-14-25-00_GUDHI_2.3.0.tar.gz \
&& cd 2018-09-04-14-25-00_GUDHI_2.3.0 \
&& mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_PYTHON=OFF -DPython_ADDITIONAL_VERSIONS=3 .. \
&& make all doxygen test install \
&& cmake -DWITH_GUDHI_PYTHON=ON . \
&& cd cython \
&& python3 setup.py install
### Gitpod user ###
# '-l': see https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
# passwordless sudo for users in the 'sudo' group
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
ENV HOME=/home/gitpod
WORKDIR $HOME
### Gitpod user (2) ###
USER gitpod
# use sudo so that user does not get sudo usage info on (the first) login
RUN sudo echo "Running 'sudo' for Gitpod: success"
### Java ###
## Place '.gradle' and 'm2-repository' in /workspace because (1) that's a fast volume, (2) it survives workspace-restarts and (3) it can be warmed-up by pre-builds.
#RUN curl -s "https://get.sdkman.io" | bash \
# && bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
# && sdk install java 8.0.202-zulufx \
# && sdk install java 11.0.2-zulufx \
# && sdk default java 8.0.202-zulufx \
# && sdk install gradle \
# && sdk install maven \
# && mkdir /home/gitpod/.m2 \
# && printf '<settings>\n <localRepository>/workspace/m2-repository/</localRepository>\n</settings>\n' > /home/gitpod/.m2/settings.xml"
# ENV GRADLE_USER_HOME=/workspace/.gradle/
# Node.js installation
RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
RUN sudo apt-get install -y nodejs
### Node.js ###
# ARG NODE_VERSION=10.15.3
# RUN curl -fsSL https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash \
# && bash -c ". .nvm/nvm.sh \
# && nvm install $NODE_VERSION \
# && npm config set python /usr/bin/python --global \
# && npm config set python /usr/bin/python \
# && npm install -g typescript yarn"
# ENV PATH=/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH
RUN sudo jupyter nbextension enable --py --sys-prefix nglview
RUN sudo jupyter nbextension enable --sys-prefix --py widgetsnbextension
RUN sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager
RUN sudo jupyter-labextension install nglview-js-widgets
RUN sudo jupyter labextension install ipyvolume
RUN sudo jupyter labextension install jupyter-threejs
RUN sudo jupyter labextension install bqplot
RUN export PATH=$PATH:"/workspace/hodgelaplacians"