-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (52 loc) · 1.89 KB
/
Dockerfile
File metadata and controls
63 lines (52 loc) · 1.89 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
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
#set bash as a default shell
ENV SHELL /bin/bash
RUN apt-get update -y && \
apt-get install wget python3-pip git -y
#settings for Mybinder
ARG NB_USER=your_user
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
#maybe copy is not necessary
#COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
ENV PATH=$PATH:${HOME}/.local/bin
#ROOT required packages
RUN apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev \
libxpm-dev libxft-dev libxext-dev python libssl-dev -y
#ROOT other packages
RUN apt-get install gfortran libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmysqlclient-dev libfftw3-dev libcfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev -y
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10
USER ${NB_USER}
#ROOT installation
ARG ROOT_VERSION="6.24.02"
RUN cd ${HOME} && \
wget https://root.cern/download/root_v${ROOT_VERSION}.Linux-ubuntu20-x86_64-gcc9.3.tar.gz && \
tar -xzvf root_v${ROOT_VERSION}.Linux-ubuntu20-x86_64-gcc9.3.tar.gz && \
rm -rf root_v${ROOT_VERSION}.Linux-ubuntu20-x86_64-gcc9.3.tar.gz && \
echo "source ${HOME}/root/bin/thisroot.sh" >> ~/.bashrc
#all pip install packages
RUN pip3 install --no-cache --upgrade pip && \
pip install --no-cache notebook jupyterlab && \
pip install numpy matplotlib && \
pip install --no-cache-dir jupyterhub && \
pip install jupyter metakernel pyroot jupyter-fortran-kernel ipykernel
#copy of aanet kernel
COPY kernel-aanet/ ${HOME}/.local/share/jupyter/kernels/kernel-aanet
#USER root
#RUN chown -Rh ${NB_UID} ${HOME}/.local/share/jupyter/kernels/kernel-aanet
#USER ${NB_USER}
WORKDIR ${HOME}