Skip to content

Commit

Permalink
Workflow to build SPI workflow from cryoAI latest
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericpoitevin committed Oct 25, 2023
1 parent 5663246 commit 082e4cb
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 12 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Only runs if the previous CMAKE base container building
# workflow has completed, or when a change is made to the
# ENV Dockerfile or the requirements.
name: "Build ENV base container"

on:
workflow_run:
workflows: ["Build CMAKE base container"]
types: [completed]

push:
branches: [ spi ]
paths:
- 'docker/Dockerfile'
- 'requirements.txt'

pull_request:
branches: [ spi ]
paths:
- 'docker/Dockerfile'
- 'requirements.txt'

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Check Out Repo
uses: actions/checkout@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./docker/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/cryoai:spi

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fpoitevi/cryonettorch-cmake-base
FROM fpoitevi/cryoai:latest

WORKDIR /work

Expand Down
19 changes: 8 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
configargparse==1.4
matplotlib==3.3.4
mrcfile==1.3.0
numpy==1.21.0
protobuf==3.20.*
pytorch3d==0.3.0
scipy==1.7.0
starfile==0.4.5
tensorboard==2.5.0
torchvision==0.10.0
tqdm==4.61.2
numba
h5py
six
scikit-learn
pytest
setuptools
gdown
jupyterlab

0 comments on commit 082e4cb

Please sign in to comment.