aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dockerignore72
-rw-r--r--.github/workflows/docker.yml64
-rw-r--r--docker/bookworm/Dockerfile18
3 files changed, 154 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..d614c1ae2
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,72 @@
+Bin/
+main?d.*.ex
+Python/pywarpx/libwarpx*.so
+d/
+f/
+o/
+build/
+tmp_build_dir/
+test_dir
+test_dir/
+AMReX_buildInfo.cpp
+Backtrace.*
+*.vth
+*.sw[opqrs]
+
+####################
+# AMReX data files #
+####################
+plt*
+chk*
+
+##########
+# Python #
+##########
+*.pyc
+__pycache__
+Python/build/
+Python/dist/
+Python/pywarpx.egg-info/
+_tmppythonbuild/
+pywarpx.egg-info/
+
+##########
+# Sphinx #
+##########
+Docs/amrex-doxygen-web.tag.xml
+Docs/warpx-doxygen-web.tag.xml
+Docs/openpmd-api-doxygen-web.tag.xml
+Docs/doxyhtml/
+Docs/doxyxml/
+Docs/source/_static/
+
+####################
+# Package Managers #
+####################
+# anonymous Spack environments
+# https://spack.readthedocs.io/en/latest/environments.html#anonymous-environments
+.spack-env/
+spack.lock
+
+#######
+# IDE #
+#######
+.idea/
+cmake-build-*/
+.kdev?/
+*.kdev?
+
+##########
+# VsCode #
+##########
+.vscode
+
+# File-based project format:
+*.iws
+
+######
+# OS #
+######
+.DS_Store
+.AppleDouble
+.LSOverride
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
new file mode 100644
index 000000000..60e4d2000
--- /dev/null
+++ b/.github/workflows/docker.yml
@@ -0,0 +1,64 @@
+name: 🐳 Docker
+
+on: [push, pull_request]
+
+concurrency:
+ group: ${{ github.ref }}-${{ github.head_ref }}-docker
+ cancel-in-progress: true
+
+env:
+ # Use docker.io for Docker Hub if empty
+ REGISTRY: ghcr.io
+ # github.repository as <account>/<repo>
+ IMAGE_NAME: ${{ github.repository }}
+
+jobs:
+ debian-docker:
+ name: Debian Docker
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+
+ - name: Setup Docker buildx
+ uses: docker/setup-buildx-action@v2
+
+ - name: Log into registry ${{ env.REGISTRY }}
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@v2
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract Docker metadata
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+ tags: |
+ type=schedule,pattern=nightly
+ type=ref,event=branch
+ type=ref,event=pr
+ type=semver,pattern={{version}}
+ type=semver,pattern={{major}}.{{minor}}
+ type=semver,pattern={{major}}
+ type=sha
+
+ - name: Build and push Docker image
+ id: build-and-push
+ uses: docker/build-push-action@v4
+ with:
+ context: .
+ file: docker/bookworm/Dockerfile
+ platforms: linux/amd64,linux/arm64
+ push: ${{ github.event_name != 'pull_request' }}
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
diff --git a/docker/bookworm/Dockerfile b/docker/bookworm/Dockerfile
new file mode 100644
index 000000000..c73608c1a
--- /dev/null
+++ b/docker/bookworm/Dockerfile
@@ -0,0 +1,18 @@
+FROM debian:bookworm
+
+ARG WARPX_DIM="3"
+ARG WARPX_CONFIGURE_OPTIONS="-DWarpX_MPI=ON -DWarpX_EB=OFF -DWarpX_OPENPMD=ON -DWarpX_QED=OFF -DWarpX_PYTHON=ON -DWarpX_PSATD=OFF -DWarpX_COMPUTE=NOACC -DWarpX_PRECISION=DOUBLE"
+
+WORKDIR /warpx
+
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends git sudo build-essential ccache cmake g++ git libfftw3-mpi-dev libfftw3-dev libhdf5-openmpi-dev libopenmpi-dev pkg-config python3 python3-dev python3-matplotlib python3-numpy python3-pandas python3-pip python3-scipy python3-venv
+
+COPY . /warpx
+
+RUN GIT_SSL_NO_VERIFY=1 cmake -S . -B build -DWarpX_DIMS=$WARPX_DIM ${WARPX_CONFIGURE_OPTIONS} && \
+ cmake --build build -j 4
+
+WORKDIR /app
+
+ENTRYPOINT [ "/warpx/build/bin/warpx" ]