-
Notifications
You must be signed in to change notification settings - Fork 6
87 lines (74 loc) · 2.49 KB
/
Docker.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
name: Docker
on:
push:
paths:
- 'docker/environment.yaml'
- '.github/workflows/Docker.yml'
jobs:
build-docker:
strategy:
fail-fast: false
matrix:
cfg:
- runs-on: ubuntu-latest
platform: linux-64
python-version: '3.10'
tags: 'psi4/psi4:latest,psi4/psi4:1.9.1,psi4/psi4:1.9'
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.cfg.runs-on }}
name: "Docker • 🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.platform }}"
steps:
- uses: actions/checkout@v3
- name: Specialize Python
working-directory: docker
run: |
cat environment.yaml
sed -i.bak 's/- python=3.8/- python=${{ matrix.cfg.python-version }}/g' environment.yaml
cat environment.yaml
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: psi4
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./docker
build-args: |
CondaFile=environment.yaml
push: true
tags: ${{ matrix.cfg.tags }}
#tags: psi4/psi4:latest,psi4/psi4:1.8.0,psi4/psi4:1.8
- name: Test
run: |
docker run psi4/psi4:latest psi4 --version
docker run psi4/psi4:latest pytest -v /opt/conda/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/tests/ --color yes -n auto -m smoke
- name: Set up Apptainer
if: false
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.1.2
- name: Run an apptainer container
if: false
#run: apptainer run docker://alpine cat /etc/os-release
run: apptainer build psi4-1.8.sif docker-daemon:psi4/psi4:latest
- name: Test Apptainer
if: false
run: |
apptainer run psi4-1.8.sif psi4 --version
apptainer run psi4-1.8.sif pytest -v /opt/conda/lib/python3.10/site-packages/psi4/tests/ --color yes -n auto -m smoke
- name: Archive Apptainer Image
if: false
uses: actions/upload-artifact@v2
with:
name: apptainer_sif
path: |
psi4-1.8.sif
retention-days: 1
- name: Push to Sylabs
if: false
run: apptainer push psi4-1.8.sif library://psi4/psi4/psi4-1.8:latest