Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make mpie-cmti standalone #426

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
tail --lines=+5 base/environment.yml >> experimental/environment.yml
docker build -t pyiron/experimental:latest experimental/
docker tag pyiron/experimental:latest pyiron/experimental:"$(date +%F)"
- name: Build pyiron/mpie_cmti
timeout-minutes: 5
run: |
tail --lines=+5 pyiron/environment.yml >> mpie_cmti/environment.yml
docker build -t pyiron/mpie_cmti:latest mpie_cmti/
docker tag pyiron/mpie_cmti:latest pyiron/mpie_cmti:"$(date +%F)"
# Testing
- run: docker images
- name: Test pyiron/continuum
Expand All @@ -71,6 +65,16 @@ jobs:
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/pyiron /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/pyiron_pyiron_$(date +%F).yml;'
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/potentialworkshop /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/pyiron_potentialworkshop_$(date +%F).yml;'
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/experimental /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/pyiron_experimental_$(date +%F).yml;'
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/mpie_cmti /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/mpie_cmti_$(date +%F).yml;'
- run: ls -al environment

build_cmti:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build pyiron/mpie_cmti
timeout-minutes: 15
run: |
docker build -t pyiron/mpie_cmti:latest mpie_cmti/
docker tag pyiron/mpie_cmti:latest pyiron/mpie_cmti:"$(date +%F)"
- run: docker images
- run: mkdir -p environment; chmod 777 environment
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/mpie_cmti /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/mpie_cmti_$(date +%F).yml;'
48 changes: 42 additions & 6 deletions mpie_cmti/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
ARG ROOT_CONTAINER=pyiron/pyiron:latest
ARG BASE_CONTAINER=$ROOT_CONTAINER
FROM $BASE_CONTAINER
ARG ROOT_IMAGE=jupyter/base-notebook:ubuntu-22.04@sha256:0ec801994602a53d3917d0f07ccf4474a1ddf5ae419483b24681a3c42abc4ce5 AS root_image
FROM $ROOT_IMAGE

MAINTAINER Jan Janssen <[email protected]>
MAINTAINER Jan Janssen <[email protected]>, Marian Bruns <[email protected]>

USER $DOCKER_UID
WORKDIR $HOME
ARG DOCKER_UID="1000"
ARG DOCKER_GID="100"

# Configure environment
ENV CONDA_DIR=/opt/conda \
SHELL=/bin/bash \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
DOCKER_UID=$DOCKER_UID \
DOCKER_GID=$DOCKER_GID \
HOME=/home/$NB_USER \
OMPI_MCA_plm=isolated \
OMPI_MCA_rmaps_base_oversubscribe=yes \
OMPI_MCA_btl_vader_single_copy_mechanism=none

# apt installation as root
USER root

# copy list of apt packages to be installed
COPY apt.txt /tmp/

# install the packages and clean up
RUN apt-get update -y &&\
xargs -a /tmp/apt.txt apt-get install -y &&\
apt-get clean &&\
rm /tmp/apt.txt

# install conda packages as $DOCKER_USER
USER ${DOCKER_UID}
WORKDIR ${HOME}
ARG PYTHON_VERSION=default

COPY . ${HOME}/
RUN mamba env update -n base -f ${HOME}/environment.yml && \
mamba clean --all -f -y && \
mamba list

# Fix permissions on /etc/jupyter as root
USER root
RUN fix-permissions /etc/jupyter/ &&\
fix-permissions ${HOME} && \
fix-permissions ${CONDA_DIR}

# switch back to DOCKER_USER
USER $DOCKER_UID
WORKDIR $HOME
2 changes: 2 additions & 0 deletions mpie_cmti/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libgl1-mesa-glx
patch
37 changes: 24 additions & 13 deletions mpie_cmti/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,40 @@ dependencies:
- aimsgb =1.1.1
- atomicrex =1.0.4
- bader =1.0.5
- bokeh =3.6.1
- calphy =1.3.11
- fitsnap3 =3.1.0.4
- flux-core =0.64.0
- git =2.46.0
- gpaw =24.6.0=*openmpi*
- jupyter-server-proxy =4.4.0
- lammps =2023.08.02=*openmpi*
- llama-index =0.12.1
- matgl =1.1.2
- maxvolpy =0.3.8
- mkl =2023.2.0
- mlip =2.0
- nbgitpuller =1.2.1
- netcdf4 =1.7.1
- nglview =3.1.2
- numba =0.60.0
- openkim-models =2021.01.28
- psycopg2 =2.9.9
- pyiron =0.5.2
- pyiron-data =0.0.30
- pyiron_atomistics =0.6.17
- pyiron_base =0.10.8
- pyiron_contrib =0.1.18
- pyiron_gpl =0.0.5
- pyiron_gui =0.0.12
- pyiron_potentialfit =0.3.7
- pyiron_workflow =0.11.2
- pyiron_gui =0.0.12
- pyironflow =0.0.4
- matgl =1.1.2
- mlip =2.0
- sqsgenerator =0.3
- pyiron_gpl =0.0.5
- python-ace =0.3.0
- pytorch =2.1.2
- pyxtal =1.0.5
- runner =1.3
- sphinxdft =3.1
- sqsgenerator =0.3
- structdbrest =0.0.1
- tensorflow =2.17.0
- psycopg2 =2.9.9
- numba =0.60.0
- llama-index =0.12.1
- jupyter-server-proxy =4.4.0
- flux-core =0.64.0
- netcdf4 =1.7.1
- maxvolpy =0.3.8
- bokeh =3.6.1
Loading