Skip to content

Commit

Permalink
Install Python dependencies via APT
Browse files Browse the repository at this point in the history
  • Loading branch information
hmenke committed Dec 13, 2023
1 parent 80c11b7 commit 7755a72
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 140 deletions.
57 changes: 23 additions & 34 deletions Docker/github_ci_dockerfile
Original file line number Diff line number Diff line change
@@ -1,68 +1,57 @@
FROM ubuntu:22.04 AS base

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates \
cmake \
curl \
cython3 \
g++-12 \
gfortran-12 \
git \
hdf5-tools \
liblapack-dev \
libboost-dev \
libfftw3-dev \
libnfft3-dev \
libgfortran5 \
libgmp-dev \
libhdf5-dev \
liblapack-dev \
libnfft3-dev \
libomp-dev \
libopenmpi-dev \
cython3 \
libpython3-dev \
openmpi-bin \
openmpi-common \
openmpi-doc \
openssl \
pandoc \
python-is-python3 \
python3-ase \
python3-decorator \
python3-dev \
python3-jinja2 \
python3-mako \
python3-numpy \
python3-scipy \
python3-matplotlib \
python3-monty \
python3-mpi4py \
python3-pip \
python3-sphinx \
python3-myst-parser \
python3-nbsphinx \
python3-skimage \
python3-notebook \
libpython3-dev \
curl \
ca-certificates \
openssl \
wget \
python3-numpy \
python3-pip \
python3-pytest \
python3-scipy \
python3-shapely \
python3-skimage \
python3-sphinx \
python3-sphinx-rtd-theme \
rsync \
libomp-dev \
sudo \
nodejs \
npm \
wget \
&& \
apt-get autoremove --purge -y && \
apt-get autoclean -y && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*

RUN pip3 install --no-cache-dir \
cython \
decorator \
pytest \
shapely \
monty \
mpi4py \
Jinja2 \
Mako \
ase \
tornado \
zmq \
tk \
myst_parser \
sphinx_rtd_theme \
linkify-it-py \
Pandoc

# the above is cached by the github action workflow
FROM base AS pkgs

Expand Down
4 changes: 2 additions & 2 deletions Docker/jupyter_start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

# start script for jupyterlab
jupyter-lab --no-browser --port 8378 --ip=0.0.0.0
# start script for jupyter notebook
jupyter notebook --no-browser --port 8378 --ip=0.0.0.0
67 changes: 21 additions & 46 deletions Docker/mpich_dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,34 @@ RUN apt-get update && \
libc++-${LLVM}-dev \
libc++abi-${LLVM}-dev \
libboost-dev \
jupyter-notebook \
pandoc \
python-is-python3 \
python3-ase \
python3-decorator \
python3-dev \
python3-jinja2 \
python3-mako \
python3-matplotlib \
python3-monty \
python3-mpi4py \
python3-myst-parser \
python3-nbsphinx \
python3-notebook \
python3-numpy \
python3-pandas \
python3-pip \
python3-pytest \
python3-scipy \
python3-setuptools \
python3-dev \
python3-shapely \
python3-skimage \
python3-sphinx \
python3-sphinx-rtd-theme \
libfftw3-dev \
libnfft3-dev \
less \
vim \
# Jupyter lab packages
texlive \
dvipng \
texlive-latex-extra \
texlive-fonts-recommended \
nodejs \
npm \
&& \
apt-get autoremove --purge -y && \
apt-get autoclean -y && \
Expand All @@ -63,44 +76,6 @@ RUN apt-get update && \

RUN ldconfig -v

##################################################
# Python modules #
##################################################

# Install python packages
RUN pip3 install --no-cache-dir \
cython \
numpy \
scipy \
matplotlib \
decorator \
jupyter \
ipywidgets \
pytest \
pylint \
pandas \
shapely \
monty \
mpi4py \
pymatgen \
Jinja2 \
Mako \
tornado \
zmq \
notebook \
tk \
scikit-image \
# Jupyter lab packages
jupyterlab \
descartes \
ipympl \
RISE

# jupyter lab extension
# TODO: fix, right now it crashes with "nodejs required"
#RUN jupyter-labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib @jupyterlab/toc
#RUN jupyter-lab build

##################################################
# TRIQS and its packages #
##################################################
Expand Down
92 changes: 34 additions & 58 deletions Docker/openmpi_dockerfile
Original file line number Diff line number Diff line change
@@ -1,57 +1,62 @@
FROM ubuntu:22.04 AS base
ARG LLVM=15
ARG NODE_MAJOR=20

# install basics for modern nodejs required for sphinx
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl sudo wget git less rsync nano openssl ca-certificates make vim gnupg \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

# This platform includes dependencies for building docs
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
clang-${LLVM} \
cmake \
cython3 \
g++ \
gfortran \
llvm-${LLVM}-dev \
libclang-${LLVM}-dev \
clang-${LLVM} \
libc++-${LLVM}-dev \
libc++abi-${LLVM}-dev \
hdf5-tools \
libmkl-dev \
libopenblas-dev \
jupyter-notebook \
libboost-dev \
libc++-${LLVM}-dev \
libc++abi-${LLVM}-dev \
libclang-${LLVM}-dev \
libevent-dev \
libfabric-dev \
libfftw3-dev \
libnfft3-dev \
libgfortran5 \
libgmp-dev \
libhdf5-dev \
libhwloc-dev \
libevent-dev \
libpmi2-0-dev \
cython3 \
# comment the next 4 lines if you want to build openmpi manually
libmkl-dev \
libnfft3-dev \
libomp-${LLVM}-dev \
libopenblas-dev \
libopenmpi-dev \
libpmi2-0-dev \
libpython3-dev \
llvm-${LLVM}-dev \
openmpi-bin \
openmpi-common \
openmpi-doc \
libfabric-dev \
libomp-${LLVM}-dev \
nodejs \
pandoc \
python-is-python3 \
python3-ase \
python3-clang-${LLVM} \
python3-decorator \
python3-dev \
python3-jinja2 \
python3-mako \
python3-numpy \
python3-scipy \
python3-matplotlib \
python3-pip \
python3-sphinx \
python3-clang-${LLVM} \
python3-skimage \
python3-monty \
python3-mpi4py \
python3-myst-parser \
python3-nbsphinx \
python3-notebook \
libpython3-dev \
python3-numpy \
python3-pandas \
python3-pip \
python3-pymatgen \
python3-pytest \
python3-scipy \
python3-shapely \
python3-skimage \
python3-sphinx \
python3-sphinx-rtd-theme \
wget \
&& \
apt-get autoremove --purge -y && \
apt-get autoclean -y && \
Expand All @@ -73,35 +78,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
# && cd .. \
# && rm -rf openmpi-4.1.5.tar.gz openmpi-4.1.5

RUN pip3 install --no-cache-dir \
mpi4py \
cython \
decorator \
jupyter \
ipywidgets \
pytest \
pandas \
shapely \
monty \
mpi4py \
pymatgen \
ase \
Jinja2 \
Mako \
tornado \
zmq \
notebook \
tk \
myst_parser \
sphinx_rtd_theme \
linkify-it-py \
Pandoc \
# Jupyter lab packages
jupyterlab \
descartes \
ipympl \
RISE

ENV PYTHON_VERSION=3.10 \
CC=clang-${LLVM} CXX=clang++-${LLVM} CXXFLAGS="-stdlib=libc++"
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM} 60 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM} --slave /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-${LLVM}
Expand Down

0 comments on commit 7755a72

Please sign in to comment.