-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile
46 lines (40 loc) · 1.37 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
# build image : docker build -t espresso .
# run container : docker run -it --rm -p 8888:8888 -v $PWD:/home espresso bash
# Currently there is problem with mpi parallel version, could be related to wsl
# backend in Windows, have not tested in other platforms.
# Get Ubuntu 22.04 to have QE 6.7
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update --fix-missing; apt upgrade -yq; \
apt install -yq --no-install-recommends \
libfftw3-dev \
quantum-espresso \
wget \
# libs for pwtk
tcl \
tcllib \
# python and optional font
python3 \
python3-pip \
fonts-open-sans
RUN cd /root && \
# pwtk installation
wget "http://pwtk.ijs.si/download/pwtk-2.0.tar.gz" && \
tar xzf pwtk-2.0.tar.gz && \
rm pwtk-2.0.tar.gz && \
echo 'export PATH="/root/pwtk-2.0:$PATH"' >> /root/.bashrc && \
# python packages
pip3 install jupyterlab \
numpy \
scipy \
matplotlib && \
# jupyterlab configs
mkdir /etc/jupyter && \
(echo "c.ServerApp.ip = '0.0.0.0'" && \
echo "c.ServerApp.allow_root = True" && \
echo "c.ServerApp.open_browser = False") \
>> /etc/jupyter/jupyter_server_config.py && \
# nodejs LTS (required for full functionality of jupyterlab)
wget -O - https://deb.nodesource.com/setup_lts.x | bash - && \
apt update && apt install -y --no-install-recommends nodejs
WORKDIR /home