Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

linux (cuda)

linux (cuda) #2

Workflow file for this run

name: Linux (CUDA)
on:
workflow_call:
inputs:
python:
description: "Python version"
required: true
type: string
cuda:
description: "CUDA version"
required: true
type: string
version:
description: "latest/stable/semver/branch"
required: true
type: string
dependencies:
description: "optional dependencies"
required: true
type: string
workflow_dispatch:
inputs:
python:
description: "Python version"
required: true
default: "3.11"
type: choice
options:
- "3.9"
- "3.10"
- "3.11"
cuda:
description: "CUDA version"
required: true
default: "11"
type: choice
options:
- "11"
version:
description: "latest/stable/semver/branch"
required: true
default: "latest"
type: string
dependencies:
description: "optional dependencies"
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -e {0} # -e to fail on error
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set build inputs
id: build
run: |
INPUT_VERSION=${{ inputs.version }}
VERSION=${INPUT_VERSION:-"latest"}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
RELEASE_BRANCH_REGEX="([0-9]+\.){2}(x)"
if [[ $VERSION == "latest" ]]; then
TARGET="latest"
elif [[ $VERSION == "stable" ]]; then
TARGET="stable"
elif [[ $VERSION =~ $RELEASE_BRANCH_REGEX ]]; then
TARGET="branch"
else
TARGET="semver"
fi
echo "target=${TARGET}" >> $GITHUB_OUTPUT
- uses: docker/build-push-action@v5
with:
context: ./docker
push: true
target: ${{ steps.build.outputs.target }}
tags: scverse/scvi-tools:py${{ inputs.python }}-cu${{ inputs.cuda }}-devel-${{ steps.build.outputs.version }}
build-args: |
PYTHON_VERSION=${{ inputs.python }}
CUDA_VERSION=${{ inputs.cuda }}
SCVI_TOOLS_VERSION=${{ steps.build.outputs.version }}
DEPENDENCIES=${{ inputs.dependencies }}