Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
workflows-workshop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
workflows-workshop
Commits
91a7b8bd
Commit
91a7b8bd
authored
4 years ago
by
Adam Fekete
Browse files
Options
Downloads
Patches
Plain Diff
multi-stage build
parent
74b8a018
No related branches found
No related tags found
1 merge request
!1
moving from github
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+42
-21
42 additions, 21 deletions
Dockerfile
with
42 additions
and
21 deletions
Dockerfile
+
42
−
21
View file @
91a7b8bd
# https://github.com/jupyter/docker-stacks
# https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html
FROM
jupyter/scipy-notebook
LABEL
maintainer="Gian-Marco Rignanese <gian-marco.rignanese@uclouvain.be>"
# # Fix DL4006
# SHELL ["/bin/bash", "-o", "pipefail", "-c"]
FROM
jupyter/scipy-notebook
AS
builder
# Abinit installation
# ===================
...
...
@@ -23,24 +19,46 @@ RUN apt-get update \
liblapack-dev libblas-dev
\
libhdf5-dev libnetcdf-dev libnetcdff-dev libpnetcdf-dev libxc-dev
\
libfftw3-dev libxml2-dev
\
slurmd slurm-client slurmctld
\
&&
rm
-rf
/var/lib/apt/lists/
*
WORKDIR
/
opt
WORKDIR
/
tmp
ARG
abinit_version="9.4.0"
COPY
configs/abinit_config.ac9 /
opt
/abinit-${abinit_version}/build/abinit_config.ac9
COPY
configs/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
\
&&
cd
abinit-
${
abinit_version
}
\
&&
cd
build
\
&&
../configure
--with-config-file
=
'abinit_config.ac9'
\
&&
../configure
--with-config-file
=
'abinit_config.ac9'
--prefix
=
/opt/abinit
\
&&
make
-j4
\
&&
make
install
\
&&
rm
/opt/abinit-
${
abinit_version
}
.tar.gz
\
# && rm -rf /opt/abinit-${abinit_version}
&& fix-permissions "/opt/abinit-${abinit_version}"
&&
make
install
FROM
jupyter/scipy-notebook
LABEL
maintainer="Gian-Marco Rignanese <gian-marco.rignanese@uclouvain.be>"
# Abinit installation
# ===================
# # 1. MPI libraries - choice for Open MPI: mpi-default libopenmpi
# # 2. math libraries - choice for lapack and blas: liblapack libblas
# # 3. mandatory libraries: libhdf5 libnetcdf libnetcdff libpnetcdf libxc libfftw3 libxml2
USER
root
WORKDIR
/opt/abinit
RUN
apt-get update
\
&&
apt
install
-y
--no-install-recommends
\
mpi-default-bin openmpi-bin libopenmpi3
\
liblapack3 libblas3
\
libhdf5-103 libnetcdf15 libnetcdff7 libpnetcdf0d libxc5
\
libfftw3-bin libxml2
\
# slurmd slurm-client slurmctld
\
&&
rm
-rf
/var/lib/apt/lists/
*
COPY
--from=builder /opt/abinit .
RUN
fix-permissions
"/opt/abinit"
USER
$NB_UID
...
...
@@ -62,17 +80,20 @@ RUN conda install --quiet --yes \
&&
fix-permissions
"
${
CONDA_DIR
}
"
\
&&
fix-permissions
"/home/
${
NB_USER
}
"
# Pseudo-dojo
USER
root
WORKDIR
/opt
#
# Pseudo-dojo
#
USER root
#
WORKDIR /opt
RUN
git clone
--depth
1 https://github.com/abinit/pseudo_dojo.git
\
&&
cd
pseudo_dojo
\
&&
fix-permissions
"/opt/pseudo_dojo"
# RUN git clone --depth 1 https://github.com/abinit/pseudo_dojo.git \
# && cd pseudo_dojo \
# && fix-permissions "/opt/pseudo_dojo"
# USER $NB_UID
# RUN pip install -e pseudo_dojo
USER
$NB_UID
RUN
pip
install
-e
pseudo_dojo
ENV
PATH=/opt/abinit/bin:$PATH
USER
$NB_UID
WORKDIR
$HOME
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment