Skip to content

option to use torch.compile (#336) #4

option to use torch.compile (#336)

option to use torch.compile (#336) #4

Workflow file for this run

name: Build and publish containers
on:
push:
tags:
- 'v*'
jobs:
build_docker:
name: Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to quay.io
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
- name: Set output variables
id: vars
run: |
echo "::set-output name=tag::${GITHUB_REF#refs/*/}"
echo "::set-output name=date::$(date +'%Y-%m-%d')"
echo "::set-output name=repo_url::${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: quay.io/vitkl/cell2location:${{ steps.vars.outputs.tag }}
labels: |
title=cell2location
description=High-throughput spatial mapping of cell types
maintainer=Vitalii Kleshchevnikov <[email protected]>
version=${{ steps.vars.outputs.tag }}
created=${{ steps.vars.outputs.date }}
url=${{ steps.vars.outputs.repo_url }}
licenses=Apache License 2.0
build_singularity:
name: Singularity image file
runs-on: ubuntu-latest
needs: build_docker
steps:
- name: Setup singularity
uses: eWaterCycle/setup-singularity@v6
with:
singularity-version: 3.6.4
- name: Set output variables
id: vars
run: |
echo "::set-output name=tag::${GITHUB_REF#refs/*/}"
- name: Build singularity container
run: |
singularity build cell2location-${{ steps.vars.outputs.tag }}.sif docker://quay.io/vitkl/cell2location:${{ steps.vars.outputs.tag }}
- name: Upload container to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: other-v2-signature
run: |
aws s3 cp cell2location-${{ steps.vars.outputs.tag }}.sif s3://cell2location/singularity/ --endpoint-url ${{ secrets.AWS_S3_ENDPOINT }} --acl public-read