Skip to content

Commit 078af45

Browse files
authored
Merge pull request #369 from openforcefield/use-ghcr
Deprecate DockerHub and Anaconda.org use
2 parents d12f04e + 3ae78ce commit 078af45

File tree

7 files changed

+42
-86
lines changed

7 files changed

+42
-86
lines changed

.github/workflows/prod-envs-docker.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
name: Deployment - QCArchive Prod Docker Environments
55

66
on:
7-
# run once prod env deployments are in place
8-
workflow_run:
9-
workflows: ["Deployment - QCArchive Prod Environments"]
10-
branches: [master]
11-
types:
12-
- completed
137
workflow_dispatch:
148

159
jobs:
@@ -22,6 +16,7 @@ jobs:
2216
- qcarchive-worker-openff-ani
2317
- qcarchive-worker-openff-openmm
2418
- qcarchive-worker-openff-psi4
19+
- qcarchive-worker-openff-psi4-ddx
2520
- qcarchive-worker-openff-xtb
2621
steps:
2722
- name: Checkout code
@@ -33,7 +28,12 @@ jobs:
3328
GITHUB_TOKEN: ${{ secrets.GH_DANGERBOT_TOKEN_LIMITED }}
3429
with:
3530
abort-after-seconds: 60
36-
31+
- name: Log in to the Container registry
32+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
3737
- name: Inject environment name into Dockerfile
3838
shell: bash
3939
env:
@@ -46,12 +46,9 @@ jobs:
4646
cat ${BUILD_DIR}/tmp/Dockerfile
4747
4848
- name: Build and push Docker images
49-
uses: docker/build-push-action@v1
49+
uses: docker/build-push-action@v6
5050
with:
51-
path: ./devtools/docker/qcarchive-worker-openff/tmp/
52-
username: ${{ secrets.DOCKERHUB_USERNAME }}
53-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
54-
repository: openforcefield/${{ matrix.env-name }}
55-
add_git_labels: true
56-
tag_with_ref: true
57-
tag_with_sha: true
51+
context: .
52+
push: true
53+
tags: ghcr.io/${{ github.repository }}:${{ matrix.env-name }}-latest
54+
file: ./devtools/docker/qcarchive-worker-openff/tmp/Dockerfile

.github/workflows/prod-envs.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

NRP/deployment_template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
operator: "Exists"
2727
effect: "NoSchedule"
2828
containers:
29-
- image: "openforcefield/qcarchive-worker-openff-psi4:sha-7669e1b"
29+
- image: "ghcr.io/openforcefield/qca-dataset-submission:qcarchive-worker-openff-psi4-latest"
3030
name: openff-pod
3131
resources:
3232
limits:

devtools/docker/qcarchive-worker-openff/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ FROM condaforge/miniforge3
22

33
SHELL ["/bin/bash", "-c"]
44

5-
RUN mamba install anaconda-client
6-
RUN mamba env create -n qcfractal openforcefield/${ENV_NAME}
5+
RUN mamba env create -n qcfractal -f https://raw.githubusercontent.com/openforcefield/qca-dataset-submission/use-ghcr/devtools/prod-envs/${ENV_NAME}.yaml
76

87
RUN groupadd -g 999 qcfractal && \
98
useradd -m -r -u 999 -g qcfractal qcfractal

devtools/prod-envs/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ This file contains production environments for OpenFF QCArchive manager deployme
44

55
Once environments are uploaded, they can be created from anywhere using the following line:
66
```bash
7-
conda env create openforcefield/<env_name> -n <env_name>
7+
mamba env create -n <env_name> -f https://raw.githubusercontent.com/openforcefield/qca-dataset-submission/use-ghcr/devtools/prod-envs/qcarchive-worker-openff-psi4.yaml
88
```
99

1010
To update an environment the current environment needs to be removed:
1111
```bash
12-
conda env remove -n <env_name>
12+
mamba env remove -n <env_name>
1313
```
1414
It should be noted that this does not remove the packages, and creating a new environment should be very quick
1515
as most required packages should already be installed.
1616

17-
To upload an environment:
18-
```bash
19-
anaconda -t <api_token> upload --user openforcefield <env_file.yaml>
20-
```
17+
To modify an environment, open a pull request to this repository and modify these files directly. Newly started workers will immediately begin using the updated yamls.
2118

19+
To make new docker images, run the [Deployment - QCArchive Prod Docker Environments action](https://github.com/openforcefield/qca-dataset-submission/actions/workflows/prod-envs-docker.yml). The new images will be served at https://github.com/openforcefield/qca-dataset-submission/pkgs/container/qca-dataset-submission.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: qcarchive-worker-openff-psi4
2+
channels:
3+
- conda-forge/label/libint_dev
4+
- conda-forge
5+
dependencies:
6+
- python =3.10
7+
- pip
8+
- qcfractalcompute
9+
- qcengine
10+
- qcelemental
11+
12+
# QM calculations
13+
- psi4
14+
- pyddx
15+
- dftd3-python
16+
- gcp-correction
17+
- scipy
18+
19+
# procedures
20+
- geometric
21+
22+
- pip:
23+
- basis_set_exchange

devtools/prod-envs/qcarchive-worker-openff-psi4.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ channels:
44
- conda-forge
55
dependencies:
66
- python =3.10
7+
- pip
78
- qcfractalcompute =0.51
89
- qcengine =0.29.0
910
- qcelemental =0.27.1

0 commit comments

Comments
 (0)