Commit 6d8f8883 authored by Adam Fekete's avatar Adam Fekete
Browse files

cleanup Dockerfile

parent 2f8450a2
......@@ -24,7 +24,7 @@ RUN apt-get update \
WORKDIR /tmp
ARG abinit_version="9.4.0"
COPY configs/abinit_config.ac9 /tmp/abinit-${abinit_version}/build/abinit_config.ac9
COPY configs/abinit/abinit_config.ac9 /tmp/abinit-${abinit_version}/build/abinit_config.ac9
RUN wget -k "https://www.abinit.org/sites/default/files/packages/abinit-${abinit_version}.tar.gz" \
&& tar xzf abinit-${abinit_version}.tar.gz \
......@@ -38,11 +38,34 @@ RUN wget -k "https://www.abinit.org/sites/default/files/packages/abinit-${abinit
FROM jupyter/scipy-notebook
LABEL maintainer="Gian-Marco Rignanese <gian-marco.rignanese@uclouvain.be>"
# Setup slurm
# ===========
USER root
RUN apt-get update \
&& apt install -y --no-install-recommends \
slurmd slurm-client slurmctld \
&& rm -rf /var/lib/apt/lists/*
COPY configs/slrum/slurm.conf /etc/slurm-llnl/slurm.conf
COPY configs/slurm/start_slurm.sh /usr/local/bin/before-notebook.d/
# https://github.com/yuwata/slurm-fedora/blob/master/slurm-setuser.in
RUN mkdir -p /run/munge \
&& chown -R jovyan /run/munge /etc/munge /var/lib/munge /var/log/munge \
&& mkdir -p /var/run/slurm-llnl \
&& chown -R jovyan /var/run/slurm-llnl /var/lib/slurm-llnl /var/log/slurm-llnl
USER $NB_UID
# Abinit installation
# ===================
# # 1. MPI libraries - choice for Open MPI: mpi-default-bin openmpi-bin libopenmpi3
# # 2. math libraries - choice for lapack and blas: liblapack3 libblas3
# # 3. mandatory libraries: libhdf5-103 libnetcdf15 libnetcdff7 libpnetcdf0d libxc5 libfftw3-bin libxml2
# - MPI libraries - choice for Open MPI: mpi-default-bin openmpi-bin libopenmpi3
# - math libraries - choice for lapack and blas: liblapack3 libblas3
# - mandatory libraries: libhdf5-103 libnetcdf15 libnetcdff7 libpnetcdf0d libxc5 libfftw3-bin libxml2
USER root
......@@ -62,64 +85,34 @@ ENV PATH=/opt/abinit/bin:$PATH
# Install Python 3 packages
# =========================
# fireworks's depenecies: flask-paginate gunicorn pymongo
# pseudo_dojo's depenecies: periodic-table-plotter atomicfile
# Depenecies:
# - fireworks: flask-paginate gunicorn pymongo
# - pseudo_dojo: periodic-table-plotter atomicfile
RUN conda install --quiet --yes \
'abipy' \
'jupyter-server-proxy' \
'flask-paginate' 'gunicorn' 'pymongo' \
'periodic-table-plotter' 'atomicfile' \
&& pip install --no-cache-dir jupyter-jsmol fireworks \
&& pip install --no-cache-dir jupyter-jsmol \
&& pip install --no-cache-dir git+https://github.com/modl-uclouvain/fireworks.git \
&& pip install --no-cache-dir git+https://github.com/modl-uclouvain/jupyter-fireworks-proxy.git \
&& pip install --no-cache-dir git+https://github.com/gpetretto/abiflows.git@develop \
&& conda clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"
# Pseudo-dojo
# ===========
# Install a "lightweight" version of Pseudo-dojo
COPY --chown=$NB_UID:$NB_GID pseudo_dojo /opt/pseudo_dojo
WORKDIR /opt/pseudo_dojo
RUN pip install -e .
# Setup slurm
# ===========
USER root
RUN apt-get update \
&& apt install -y --no-install-recommends \
slurmd slurm-client slurmctld \
&& rm -rf /var/lib/apt/lists/*
COPY configs/slurm.conf /etc/slurm-llnl/slurm.conf
COPY configs/start_slurm.sh /usr/local/bin/before-notebook.d/
# https://github.com/yuwata/slurm-fedora/blob/master/slurm-setuser.in
RUN mkdir -p /run/munge \
&& chown -R jovyan /run/munge /etc/munge /var/lib/munge /var/log/munge \
&& mkdir -p /var/run/slurm-llnl \
&& chown -R jovyan /var/run/slurm-llnl /var/lib/slurm-llnl /var/log/slurm-llnl
USER $NB_UID
COPY --chown=$NB_UID:$NB_GID fireworks /opt/fireworks
WORKDIR /opt/fireworks
RUN pip install -e .
COPY --chown=$NB_UID:$NB_GID jupyter-fireworks-proxy /opt/jupyter-fireworks-proxy
WORKDIR /opt/jupyter-fireworks-proxy
RUN pip install -e .
# RUN pip install git+https://github.com/fekad/jupyter-fireworks-proxy.git \
# && jupyter serverextension enable --sys-prefix jupyter_server_proxy
# temporarily install abiflows from develop repository
RUN pip install git+https://github.com/gpetretto/abiflows.git@develop
# Setup home folder
# =================
WORKDIR $HOME
COPY --chown=$NB_UID:$NB_GID tutorials tutorials
COPY --chown=$NB_UID:$NB_GID configs/FW_config.yaml configs/my_launchpad.yaml configs/my_fworker.yaml configs/my_qadapter.yaml configs/SLURM_template.txt .fireworks/
COPY --chown=$NB_UID:$NB_GID configs/manager.yml configs/scheduler.yml configs/fw_manager.yaml .abinit/abipy/
COPY --chown=$NB_UID:$NB_GID configs/abipy .abinit/abipy
COPY --chown=$NB_UID:$NB_GID configs/fireworks .fireworks
COPY --chown=$NB_UID:$NB_GID tutorials tutorials
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment