Skip to content

Commit

Permalink
migrate from dockerhub to the github container registry
Browse files Browse the repository at this point in the history
  • Loading branch information
walshmm committed May 12, 2023
1 parent fa8d91a commit f2e5652
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-github-actions-static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
include:
- jobname: ClangTidy14-NoMPI-Real
container:
image: williamfgc/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: ClangTidy14-NoMPI-Complex
container:
image: williamfgc/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

steps:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/ci-github-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,72 +40,72 @@ jobs:
include:
- jobname: GCC9-NoMPI-Debug-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: GCC9-NoMPI-NoOMP-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: GCC9-NoMPI-NoOMP-Complex
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: GCC9-NoMPI-Sandbox-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: GCC9-MPI-Gcov-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: GCC9-MPI-Gcov-Complex
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: GCC11-NoMPI-Werror-Real
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
image: ghcr.io/qmcpack/ubuntu2110-serial:latest
options: -u 1001

- jobname: GCC11-NoMPI-Werror-Complex
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
image: ghcr.io/qmcpack/ubuntu2110-serial:latest
options: -u 1001

- jobname: GCC11-NoMPI-Werror-Real-Mixed
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
image: ghcr.io/qmcpack/ubuntu2110-serial:latest
options: -u 1001

- jobname: GCC11-NoMPI-Werror-Complex-Mixed
container:
image: williamfgc/qmcpack-ci:ubuntu2110-serial
image: ghcr.io/qmcpack/ubuntu2110-serial:latest
options: -u 1001

- jobname: Clang14-NoMPI-ASan-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: Clang14-NoMPI-ASan-Complex
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: Clang14-NoMPI-UBSan-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-openmpi
image: ghcr.io/qmcpack/ubuntu22-openmpi:latest
options: -u 1001

- jobname: Clang16-NoMPI-Offload-Real
container:
image: walshmm/qmcpack-ci:ubuntu22-clang-latest
image: ghcr.io/qmcpack/ubuntu22-clang:latest
options: -u 1001

steps:
Expand Down Expand Up @@ -191,19 +191,19 @@ jobs:
include:
- jobname: GCC11-NoMPI-Debug-Real
container:
image: walshmm/qmcpack-ci:centos-stream-gcc11
image: ghcr.io/qmcpack/centos-stream-gcc11:latest
options: -u 1001
- jobname: GCC11-NoMPI-NoOMP-Real
container:
image: walshmm/qmcpack-ci:centos-stream-gcc11
image: ghcr.io/qmcpack/centos-stream-gcc11:latest
options: -u 1001
- jobname: GCC11-NoMPI-NoOMP-Complex
container:
image: walshmm/qmcpack-ci:centos-stream-gcc11
image: ghcr.io/qmcpack/centos-stream-gcc11:latest
options: -u 1001
- jobname: GCC11-NoMPI-Sandbox-Real
container:
image: walshmm/qmcpack-ci:centos-stream-gcc11
image: ghcr.io/qmcpack/centos-stream-gcc11:latest
options: -u 1001

steps:
Expand Down
4 changes: 2 additions & 2 deletions docs/github_actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: This is not necessarily the intended typical way for users to build QMCPAC

Jobs running on GitHub hosted runners are triggered automatically. Permission from an admin is required to run jobs on self-hosted runners for security reasons. In addition, jobs running on GitHub hosted runners run automatically in parallel and the time each job takes may vary depending on system utilization. For information on the underlying hardware see the GitHub Actions `docs on the topic <https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners>`_.

All Linux jobs GitHub Runner hosts currently use the `walshmm/qmcpack-ci:ubuntu22-openmpi <https://hub.docker.com/repository/docker/walshmm/qmcpack-ci>`_ docker image, if you would like to reproduce theses tests exactly using docker, please refer to `Running QMCPACK on Docker Containers <https://qmcpack.readthedocs.io/en/develop/running_docker.html>`_ section in the QMCPACK documentation. The macOS job runs directly on the `macos-latest GitHub Actions VM runner <https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources>`_
All Linux jobs GitHub Runner hosts currently use the `ghcr.io/qmcpack/ubuntu22-openmpi:latest <https://github.com/orgs/QMCPACK/packages/container/package/ubuntu22-openmpi>`_ docker image, if you would like to reproduce theses tests exactly using docker, please refer to `Running QMCPACK on Docker Containers <https://qmcpack.readthedocs.io/en/develop/running_docker.html>`_ section in the QMCPACK documentation. The macOS job runs directly on the `macos-latest GitHub Actions VM runner <https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources>`_


.. note::
Expand Down Expand Up @@ -67,7 +67,7 @@ To run the workflow:
- Click on `Run workflow` on the right
- Use workflow from `Branch:develop` and click on the `Run workflow` button

**Note:** the current `.clang-tidy` configuration file is compatible with clang v14 and runs on the `williamfgc/qmcpack-ci:ubuntu22-openmpi` docker image. To run locally on a Linux system use: `docker run -it user williamfgc/qmcpack-ci:ubuntu22-openmpi /bin/bash` or refer to the :ref:`running_docker` section.
**Note:** the current `.clang-tidy` configuration file is compatible with clang v14 and runs on the `ghcr.io/qmcpack/ubuntu22-openmpi:latest` docker image. To run locally on a Linux system use: `docker run -it user ghcr.io/qmcpack/ubuntu22-openmpi:latest /bin/bash` or refer to the :ref:`running_docker` section.

To build locally enabling `clang-tidy`` static checks defined in `qmcpack/src/.clang-tidy` use the CMake `-DCMAKE_CXX_CLANG_TIDY` option as follows:

Expand Down
18 changes: 9 additions & 9 deletions docs/running_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ This guide will briefly cover running QMCPACK on your machine using a docker con
Current Images
--------------

Docker containers are identified by `domain/image:tag` and stored using `DockerHub <https://hub.docker.com/>`_.
Docker containers are identified by `domain/image:tag` and stored using `The Github Container Registry <https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry>`_.
Currently available containers have pre-installed QMCPACK dependencies, see the Dockerfile file link for available dependencies on each image:

- `Linux containers <https://hub.docker.com/r/williamfgc/qmcpack-ci/tags>`_
- williamfgc/qmcpack-ci:ubuntu20-openmpi: `Dockerfile <https://github.com/QMCPACK/qmcpack/blob/develop/config/docker/dependencies/ubuntu/openmpi/Dockerfile>`_
- williamfgc/qmcpack-ci:ubuntu20-clang-latest: `Dockerfile <https://github.com/QMCPACK/qmcpack/blob/develop/config/docker/dependencies/ubuntu/clang-latest/Dockerfile>`_
- walshmm/qmcpack-ci:centos-stream-gcc11: `Dockerfile <https://github.com/QMCPACK/qmcpack/blob/develop/config/docker/dependencies/centos-stream/Dockerfile>`_
- `Linux containers <https://github.com/orgs/QMCPACK/packages>`_
- ghcr.io/qmcpack/ubuntu22-openmpi:latest: `Dockerfile <https://github.com/QMCPACK/qmcpack/blob/develop/config/docker/dependencies/ubuntu/openmpi/Dockerfile>`_
- ghcr.io/qmcpack/ubuntu22-clang:latest: `Dockerfile <https://github.com/QMCPACK/qmcpack/blob/develop/config/docker/dependencies/ubuntu/clang-latest/Dockerfile>`_
- ghcr.io/qmcpack/centos-stream-gcc11:latest: `Dockerfile <https://github.com/QMCPACK/qmcpack/blob/develop/config/docker/dependencies/centos-stream/Dockerfile>`_


Running Docker Containers
Expand All @@ -35,23 +35,23 @@ Running Docker Containers

.. code-block:: bash
docker pull williamfgc/qmcpack-ci:ubuntu20-openmpi
docker pull ghcr.io/qmcpack/ubuntu22-openmpi:latest
3. **Run an image**: the `docker run` command will spin up a container with using the image we just downloaded from step 2. Alternatively, `docker run` will automatically fallback to pulling the image and tag from DockerHub (requires connection).

For a quick and safe, non `sudo`, run:

.. code-block:: bash
docker run -it williamfgc/qmcpack-ci:ubuntu20-openmpi /bin/bash
docker run -it ghcr.io/qmcpack/ubuntu22-openmpi:latest /bin/bash
The above will run the container in interactive mode dropping the default `user` to `/home/user` using the `bash` shell. If `sudo` access is needed (e.g. install a package `sudo apt-get install emacs`) the password for the default `user` is also `user`.

**Run an image (for Development)** `docker run` has a few extra options that can be used to run QMCPACK:

.. code-block:: bash
docker run -u $(id -u `stat -c "%U" .`):$(id -g `stat -c "%G" .`) -v <QMCPACK Source Directory>:/home/user -it williamfgc/qmcpack-ci:ubuntu20-openmpi /bin/bash
docker run -u $(id -u `stat -c "%U" .`):$(id -g `stat -c "%G" .`) -v <QMCPACK Source Directory>:/home/user -it ghcr.io/qmcpack/ubuntu22-openmpi:latest /bin/bash
Flags used by `docker run` (Note: The flags -i and -t are combined above):
Expand All @@ -68,7 +68,7 @@ Running Docker Containers

.. code-block:: bash
docker run -u root -v path/to/QMCPACK:home/user -it williamfgc/qmcpack-ci:ubuntu20-openmpi /bin/bash
docker run -u root -v path/to/QMCPACK:home/user -it ghcr.io/qmcpack/ubuntu22-openmpi:latest /bin/bash
Build QMCPACK on Docker
Expand Down

0 comments on commit f2e5652

Please sign in to comment.