This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
Docker Build + Publish #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build + Publish | |
on: | |
workflow_call: | |
inputs: | |
push_to_repository: | |
description: "whether to push out the docker image: false (default) or true" | |
type: boolean | |
default: false | |
gitref: | |
description: "git commit hash or branch name" | |
type: string | |
default: 'main' | |
wf_category: | |
description: "type of nm-vllm to install for the docker image: NIGHTLY (default) or RELEASE" | |
type: string | |
default: 'NIGHTLY' | |
whl: | |
description: "nm-vllm wheel to install for the docker image" | |
type: string | |
required: true | |
workflow_dispatch: | |
inputs: | |
push_to_repository: | |
description: "whether to push out the docker image: false (default) or true" | |
type: boolean | |
default: false | |
gitref: | |
description: "git commit hash or branch name" | |
type: string | |
default: 'main' | |
wf_category: | |
description: "type of nm-vllm to install for the docker image: NIGHTLY (default) or RELEASE" | |
type: string | |
default: 'NIGHTLY' | |
whl: | |
description: "nm-vllm wheel to install for the docker image" | |
type: string | |
required: true | |
jobs: | |
build-docker-image: | |
runs-on: aws-avx2-32G-a10g-24G | |
timeout-minutes: 60 | |
steps: | |
- name: Login to Github Packages | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ inputs.gitref }} | |
submodules: recursive | |
- name: Set up nvidia-container-toolkit | |
id: setup | |
uses: ./.github/actions/nm-setup-nvidia-container-toolkit/ | |
- name: Get docker image tags | |
id: tags | |
uses: ./.github/actions/nm-get-docker-tags/ | |
with: | |
wf_category: ${{ inputs.wf_category }} | |
whl: ${{ inputs.whl }} | |
- name: Build image | |
id: build | |
uses: ./.github/actions/nm-build-docker/ | |
with: | |
docker_tag: ${{ steps.tags.outputs.tag }} | |
extra_tag: ${{ steps.tags.outputs.extra_tag }} | |
wf_category: ${{ inputs.wf_category }} | |
build_version: ${{ steps.tags.outputs.build_version }} | |
- name: Push image | |
uses: docker/build-push-action@v5 | |
if: ${{ inputs.push_to_repository && steps.build.outputs.status == 0 }} | |
with: | |
context: . | |
target: vllm-openai | |
push: true | |
tags: ghcr.io/neuralmagic/nm-vllm-openai:${{ steps.tags.outputs.tag }} | |
- name: Push image | |
uses: docker/build-push-action@v5 | |
if: ${{ inputs.push_to_repository && steps.build.outputs.status == 0 }} | |
with: | |
context: . | |
target: vllm-openai | |
push: true | |
tags: ghcr.io/neuralmagic/nm-vllm-openai:${{ steps.tags.outputs.extra_tag }} |