-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (48 loc) · 1.26 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
FROM jupyter/base-notebook
USER root
# Install Ubuntu packages
RUN apt-get update && apt-get install -yq --no-install-recommends --fix-missing \
apt-utils \
build-essential \
git \
nano \
vim \
clang \
cmake \
libboost-test-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Swtich back to normal user
USER $NB_UID
WORKDIR /home/${NB_USER}
# Create a directory for the course material
RUN mkdir -p mmm2023
# Create a container volume to make data persistent
VOLUME /home/${NB_USER}/mmm2023
# Download librascal & install Python bindings
RUN mkdir -p /home/${NB_USER}/librascal && \
cd /home/${NB_USER}/librascal && \
git clone https://github.com/lab-cosmo/librascal .
# Compile C++ library
RUN cd /home/${NB_USER}/librascal && \
pip install -r requirements.txt && \
mkdir -p build && \
cd build && \
cmake -DUSER=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DBUILD_BINDINGS=ON .. && \
make install
# Install Python requirements with Conda
RUN conda install --quiet --yes \
'numpy' \
'scipy' \
'seaborn' \
'matplotlib-base' \
'scikit-learn'
RUN conda install -y -c conda-forge \
'nglview==3.0.4' \
'ipywidgets==7.7.5' \
'skmatter' \
'ase' \
'spglib'
# Switch to normal user
WORKDIR /home/${NB_USER}
USER $NB_UID