Skip to content

Commit

Permalink
In UM2N Dockerfile use firedrake-parmmg as base (#88)
Browse files Browse the repository at this point in the history
Related to #13. Cuts down the size of UM2N Docker image by about 4GB.
  • Loading branch information
ddundo authored Dec 11, 2024
1 parent 37d6a27 commit 3f34cd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/docker_firedrake-um2n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ on:
- '.github/workflows/docker_firedrake-um2n.yml'
- 'docker/Dockerfile.firedrake-um2n'

# Trigger this workflow when docker_firedrake-parmmg.yml completes on the main branch
workflow_run:
workflows: 'Build bespoke Firedrake Docker container'
types:
- completed
branches:
- main

# Manually trigger the workflow
workflow_dispatch:

# Build and push the Docker container every Saturday at 2AM
schedule:
- cron: '0 2 * * 6'

# Stop the workflow if a new run is requested
concurrency:
group: 'docker_firedrake-um2n-${{ github.ref }}'
Expand Down
10 changes: 3 additions & 7 deletions docker/Dockerfile.firedrake-um2n
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# Dockerfile for installing Firedrake plus UM2N and its dependencies with CPU support

# Based on firedrake
FROM firedrakeproject/firedrake-vanilla:latest
FROM ghcr.io/mesh-adaptation/firedrake-parmmg:latest

USER firedrake
WORKDIR /home/firedrake

RUN bash -c "source firedrake/bin/activate && \
pip3 install torch --index-url https://download.pytorch.org/whl/cpu && \
cd firedrake/src && \
pip3 install torch --index-url https://download.pytorch.org/whl/cpu && \
git clone https://github.com/mesh-adaptation/movement.git && \
git clone https://github.com/mesh-adaptation/UM2N.git && \
cd movement && \
make install && \
python3 -m pip uninstall cffconvert -y && \
cd ../UM2N && \
python3 -m pip install -e ."
python3 -m pip install -e UM2N"

# NOTE: cffconvert is not currently used in UM2N and requires a conflicting
# version of jsonschema with other dependencies.

0 comments on commit 3f34cd8

Please sign in to comment.