Skip to content
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
42 changes: 41 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,43 @@ jobs:
with:
path: environment/*.yml
key: all_env_${{ steps.date.outputs.date }}$
build_pyiron_workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: pyiron-workshop/DPG-tutorial-2025
path: pyiron_workflow/DPG-tutorial-2025
- uses: actions/checkout@v4
with:
repository: samwaseda/tensile_test
path: pyiron_workflow/tensile_test
- name: Get current date
id: date
run: echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build pyiron/pyiron_workflow
timeout-minutes: 10
run: |
docker build -t pyiron/pyiron_workflow:latest pyiron_workflow/
docker tag pyiron/pyiron_workflow:latest pyiron/pyiron_workflow:"$(date +%F)"
# Publish
- run: docker images
- run: docker push pyiron/pyiron_workflow:latest
- run: docker push pyiron/pyiron_workflow:"$(date +%F)"
# Export Environments
- run: mkdir -p environment; chmod 777 environment
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/pyiron_workflow /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/pyiron_workflow_$(date +%F).yml;'
- run: ls -al environment
- name: cache
uses: actions/cache/save@v4
with:
path: environment/*.yml
key: pyiron_workflow_env_${{ steps.date.outputs.date }}$
release:
needs: [build]
needs: [build, build_pyiron_workflow]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -75,6 +110,11 @@ jobs:
tag: ${{ steps.date.outputs.date }}
tag_exists_error: false
message: ""
- name: cache_cmti
uses: actions/cache/restore@v4
with:
path: environment/*.yml
key: pyiron_workflow_env_${{ steps.date.outputs.date }}$
- name: cache
uses: actions/cache/restore@v4
with:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,38 @@ jobs:
with:
path: environment/*.yml
key: all_env_-${{ steps.date.outputs.date }}
build_pyiron_workflow:
needs: [pip_check]
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: pyiron-workshop/DPG-tutorial-2025
path: pyiron_workflow/DPG-tutorial-2025
- uses: actions/checkout@v4
with:
repository: samwaseda/tensile_test
path: pyiron_workflow/tensile_test
- name: Build pyiron/pyiron_workflow
timeout-minutes: 60
run: |
docker build -t pyiron/pyiron_workflow:latest pyiron_workflow/
docker tag pyiron/pyiron_workflow:latest pyiron/pyiron_workflow:"$(date +%F)"
- run: docker images
- run: mkdir -p environment; chmod 777 environment
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/pyiron_workflow /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/pyiron_workflow_$(date +%F).yml;'
- name: cache
uses: actions/cache/save@v4
with:
path: environment/*.yml
key: pyiron_workflow_-${{ steps.date.outputs.date }}
- name: test pyiron/pyiron_workflow
run: |
docker run -v $(pwd)/pyiron_workflow/test:/home/jovyan/test --rm pyiron/pyiron_workflow /bin/bash -c 'source /opt/conda/bin/activate; python test/import.py;'
check:
needs: [build]
runs-on: ubuntu-latest
Expand Down
53 changes: 53 additions & 0 deletions pyiron_workflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG ROOT_IMAGE=quay.io/jupyter/base-notebook:b74418220768 AS root_image
FROM $ROOT_IMAGE

MAINTAINER Niklas Siemer <n.siemer@mpi-susmat.de>

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 && \
mv ${HOME}/pyiron_config ${HOME}/.pyiron

# 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
5 changes: 5 additions & 0 deletions pyiron_workflow/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
libgl1
cmake
libglx-mesa0
patch
git
28 changes: 28 additions & 0 deletions pyiron_workflow/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
channels:
- conda-forge
- nodefaults
dependencies:
- git =2.46.0
- gxx
- pyiron
- pyiron_atomistics =0.7
- pyiron-data =0.0.30
- nglview =3.1.4
- lammps =2024.06.27=*openmpi*
- openkim-models =2021.01.28
- nbgitpuller =1.2.2
- python-ace =0.3.0
- calphy =1.4.3
- pyxtal =1.0.9
- sphinxdft =3.1
- numpy >1.20,<2
- ase =3.25.0
- damask =3.0.2
- requests =2.32.4
- matplotlib
- pyiron_workflow =0.12.0
- pyironflow =0.0.9
- pip
- pip:
- git+https://github.com/pmrv/python-ace.git
- tensorpotential ==0.4.5
4 changes: 4 additions & 0 deletions pyiron_workflow/pyiron_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[DEFAULT]
PROJECT_CHECK_ENABLED = False
DISABLE_DATABASE = True

2 changes: 2 additions & 0 deletions pyiron_workflow/test/import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from pyiron_atomistics import Project
Project('.').create.structure.bulk("Fe").repeat(2).plot3d()
Loading