-
Notifications
You must be signed in to change notification settings - Fork 27
213 lines (201 loc) · 6.65 KB
/
docker-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: CI tests with docker container
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'docs/*'
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
- 'docs/*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and export
uses: docker/build-push-action@v2
with:
context: .
tags: pysages:latest
outputs: type=docker,dest=/tmp/pysages.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: pysages
path: /tmp/pysages.tar
retention-days: 1
forward-flux-sampling:
runs-on: ubuntu-latest
container:
image: ssages/pysages-openmm
options: --user root --privileged
steps:
- uses: actions/checkout@v3
- name: Install pysages and dependecies
env:
JAX_PIP_URL: https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
run: |
pip install --upgrade "jax[cuda]" -f "${{ env.JAX_PIP_URL }}"
pip install .
- name: Load and run test
run: |
cd examples/openmm
python3 forward_flux_sampling.py \
--cv-start=80 --cv-distance=2 --window-number=2 --sampling-steps=50 --replicas=5
abf-alanine-dipeptide-openmm:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -t pysages bash -c "cd PySAGES/examples/openmm/abf/ && python3 ./alanine-dipeptide_openmm.py"
abf-tip3p-water-ase:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -t pysages bash -c "cd PySAGES/examples/ase/abf/ && python3 ./water.py"
metad-alanine-dipeptide-openmm:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -t pysages bash -c "cd PySAGES/examples/openmm/metad/ && python3 ./alanine-dipeptide.py --time-steps=25"
alanine-dipeptide-openmm-mpi:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
SCRIPT="cd PySAGES/examples/openmm/umbrella_integration &&"
SCRIPT="${SCRIPT} mpirun --allow-run-as-root --oversubscribe -n 6"
SCRIPT="${SCRIPT} python3 -m mpi4py.futures"
SCRIPT="${SCRIPT} integration.py --replicas=5 --time-steps=1000 --mpi"
docker load --input /tmp/pysages.tar
docker run --privileged -t pysages bash -c "${SCRIPT}"
metad-hoomd:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -v/tmp:/tmp -t pysages bash -c "cd PySAGES/examples/hoomd-blue/metad/ && python3 butane.py --use-grids=1 --time-steps=5000"
harmonic-bias-hoomd:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -v/tmp:/tmp -t pysages bash -c "cd PySAGES/examples/hoomd-blue/harmonic_bias/ && ./run.sh && mv hist.pdf /tmp/"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: harmonic-hist.pdf
path: /tmp/hist.pdf
retention-days: 7
umbrella-integration-hoomd:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
docker load --input /tmp/pysages.tar
docker run -v /tmp:/tmp -t pysages bash -c "cd PySAGES/examples/hoomd-blue/umbrella_integration && python3 ./gen_gsd.py && python3 integration.py --replicas=5 --time-steps=1000 && mkdir /tmp/plots && mv *.pdf /tmp/plots/"
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: umbrella-integration-plots
path: /tmp/plots
retention-days: 1
umbrella-integration-hoomd-mpi:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: pysages
path: /tmp
- name: Load and run test
run: |
SCRIPT="cd PySAGES/examples/hoomd-blue/umbrella_integration &&"
SCRIPT="${SCRIPT} python3 ./gen_gsd.py &&"
SCRIPT="${SCRIPT} mpirun --allow-run-as-root --oversubscribe -n 3"
SCRIPT="${SCRIPT} python3 -m mpi4py.futures"
SCRIPT="${SCRIPT} integration.py --replicas=5 --time-steps=1000 --mpi &&"
SCRIPT="${SCRIPT} mkdir /tmp/plots && mv *.pdf /tmp/plots/"
docker load --input /tmp/pysages.tar
docker run -v /tmp:/tmp -t pysages bash -c "${SCRIPT}"
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: umbrella-integration-mpi-plots
path: /tmp/plots
retention-days: 1