From 082e4cb70871b051f8e1be06578cca558011ac64 Mon Sep 17 00:00:00 2001 From: fredericpoitevin Date: Wed, 25 Oct 2023 13:44:46 -0700 Subject: [PATCH] Workflow to build SPI workflow from cryoAI latest --- .github/workflows/spi.yml | 60 +++++++++++++++++++++++++++++++++++++++ docker/Dockerfile | 2 +- requirements.txt | 19 ++++++------- 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/spi.yml diff --git a/.github/workflows/spi.yml b/.github/workflows/spi.yml new file mode 100644 index 0000000..2301832 --- /dev/null +++ b/.github/workflows/spi.yml @@ -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 }} \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 0a496f9..05aa23f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM fpoitevi/cryonettorch-cmake-base +FROM fpoitevi/cryoai:latest WORKDIR /work diff --git a/requirements.txt b/requirements.txt index 9855de4..41ccea4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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