-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 2.75 KB
/
automated_screens.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
name: Automated screening
env:
OMP_NUM_THREADS: '1'
on: [workflow_dispatch]
jobs:
automated_screens:
name: automated screens for various chemistries
runs-on: [self-hosted, linux, shared-scratch]
container:
image: docker://ulissigroup/catlas:latest
volumes:
- /home/jovyan/shared-scratch:/home/jovyan/shared-scratch
timeout-minutes: 2880
steps:
- uses: azure/k8s-set-context@v2
with:
method: kubeconfig
kubeconfig: ${{ secrets.ZULISSI_KUBECONFIG }}
context: ulissigroup-desktops-fqdn
id: setcontext
- run: |
mkdir -p /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID
mkdir -p /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID/catlas
ln -s /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID/catlas
(cd /home/jovyan/ocp && git pull)
rsync -a /home/jovyan/ocp /home/jovyan/shared-scratch/catlas_runners/$GITHUB_RUN_ID/
- uses: actions/checkout@v3
with:
path: catlas
- name: Test direct inference with kubecluster
run: |
cd catlas
ln -s /home/jovyan/shared-scratch/ocp_checkpoints
ln -s /home/jovyan/shared-scratch/catlas/df_pkls ./catlas/parity/
ln -s /home/jovyan/shared-scratch/catlas/pourbaix_diagrams ./catlas/
python setup.py develop
- name: Startup dask cluster
run: |
sed -i "s/GITHUB_RUN_ID/$GITHUB_RUN_ID/g" catlas/configs/dask_cluster/dask_operator/catlas-hybrid-cluster-github.yml
sed -i "s/catlas-hybrid-cluster/catlas-hybrid-cluster-$GITHUB_RUN_ID/g" catlas/configs/dask_cluster/dask_operator/dask_connect.py
kubectl apply -f catlas/configs/dask_cluster/dask_operator/catlas-hybrid-cluster-github.yml
sleep 10
kubectl scale --replicas=80 daskworkergroup catlas-hybrid-cluster-$GITHUB_RUN_ID-default-worker-group
kubectl scale --replicas=8 daskworkergroup catlas-hybrid-cluster-$GITHUB_RUN_ID-gpu-worker-group
- name: Run screens
shell: bash
run: |
cd catlas
python bin/predictions.py configs/automated_screens/nitrides_CO2RR.yml configs/dask_cluster/dask_operator/dask_connect.py &
python bin/predictions.py configs/automated_screens/intermetallics_ORR.yml configs/dask_cluster/dask_operator/dask_connect.py &
python bin/predictions.py configs/automated_screens/HER.yml configs/dask_cluster/dask_operator/dask_connect.py &
python bin/predictions.py configs/automated_screens/intermetallics_CO2RR.yml configs/dask_cluster/dask_operator/dask_connect.py &
for job in `jobs -p`
do
wait $job
done
- name: Shut down dask cluster
if: always()
run: |
kubectl delete daskcluster catlas-hybrid-cluster-$GITHUB_RUN_ID