-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.from_source
More file actions
103 lines (95 loc) · 2.76 KB
/
Copy pathDockerfile.from_source
File metadata and controls
103 lines (95 loc) · 2.76 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
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
FROM --platform=linux/amd64 ubuntu:26.04
ARG LLVM=20
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
make \
meson \
cmake \
g++ \
gfortran \
git \
htop \
nano \
vim \
less \
curl \
hdf5-tools \
openssh-client \
clang-${LLVM} \
llvm-${LLVM}-dev \
libclang-${LLVM}-dev \
libc++-${LLVM}-dev \
libc++abi-${LLVM}-dev \
libomp-${LLVM}-dev \
lldb-${LLVM} \
libboost-dev \
libeigen3-dev \
libfftw3-dev \
libgfortran5 \
libgmp-dev \
libmpfr-dev \
libhdf5-dev \
libmkl-dev \
libopenmpi-dev \
libnfft3-dev \
libzstd-dev \
openmpi-bin \
openmpi-common \
openmpi-doc \
python3-clang-${LLVM} \
python3-dev \
python3-ipython \
python3-mako \
python3-matplotlib \
python3-mpi4py \
python3-numpy \
python3-pandas \
python3-pytest \
python3-scipy \
python3-setuptools \
python3-skimage \
python3-tk \
python3-tomli \
python3-venv \
jupyter-notebook \
&& \
apt-get autoremove --purge -y && \
apt-get autoclean -y && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3 /usr/bin/python
ARG NB_USER=triqs
ARG NB_UID=1010
RUN useradd -u ${NB_UID} -m ${NB_USER} -o
USER ${NB_USER}
RUN python3 -m venv --system-site-packages /home/${NB_USER}/.venv
ENV VIRTUAL_ENV=/home/${NB_USER}/.venv \
PATH=/home/${NB_USER}/.venv/bin:$PATH
RUN pip install jupyterlab jupyterhub jupyter-archive
ARG BRANCH=unstable
ARG NCORES=10
ARG ARCH=native
ENV SRC=/tmp/src BUILD=/tmp/build INSTALL=/usr \
CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu/openmpi:/usr/include/hdf5/serial:/usr/include/mkl:$CPLUS_INCLUDE_PATH \
CC=clang-${LLVM} CXX=clang++-${LLVM} CXXFLAGS="-stdlib=libc++ -march=${ARCH}"
USER root
RUN set -ex ; \
for pkg in triqs cthyb ctseg ctint tprf maxent hubbardI hartree_fock dft_tools solid_dmft ; do \
mkdir $BUILD ; cd $BUILD ; \
git clone https://github.com/TRIQS/$pkg --branch $BRANCH --depth 1 $SRC ; \
cmake $SRC -DCMAKE_INSTALL_PREFIX=$INSTALL ; \
make -j$NCORES ; \
make install ; \
rm -rf $SRC $BUILD ; \
done
RUN set -ex ; \
mkdir $BUILD ; cd $BUILD ; \
git clone https://github.com/flatironinstitute/clair --branch unstable --depth 1 $SRC ; \
CXXFLAGS="" cmake $SRC -DCMAKE_INSTALL_PREFIX=$INSTALL ; \
make -j$NCORES ; \
make install ; \
rm -rf $SRC $BUILD ;
USER ${NB_USER}
RUN git clone https://github.com/triqs/tutorials --branch unstable --depth 1 /home/${NB_USER}/tutorials
WORKDIR /home/${NB_USER}/tutorials/
EXPOSE 8888
CMD ["jupyter","lab","--ip","0.0.0.0", "--no-browser"]