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

Docker Build + Publish #18

Docker Build + Publish

Docker Build + Publish #18

name: Docker Build + Publish
on:
workflow_dispatch:
inputs:
docker_tag:
description: "tag to be used for the docker image"
type: string
required: true
push_to_repository:
description: "whether to push out the docker image: no (default) or yes"
type: string
default: 'no'
gitref:
description: "git commit hash or branch name"
type: string
default: 'main'
build_type:
description: "type of nm-vllm to install for the docker image: NIGHTLY (default) or RELEASE"
type: string
default: 'NIGHTLY'
build_version:
description: "version of nm-vllm to install for the docker image: latest (default) or specific version e.g. 0.4.0, 0.4.0.20240531"
type: string
default: 'latest'
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@v3
with:
fetch-depth: 1
submodules: recursive
- name: Set up nvidia-container-toolkit
id: setup
uses: ./.github/actions/nm-setup-nvidia-container-toolkit/
- name: Get image additional tag
id: tag
uses: ./.github/actions/nm-get-tag/
with:
build_type: ${{ inputs.build_type }}
- name: Build image
id: build
uses: ./.github/actions/nm-build-docker/
with:
docker_tag: ${{ inputs.docker_tag }}
additional_tag: ${{ steps.tag.outputs.tag }}
build_type: ${{ inputs.build_type }}
build_version: ${{ inputs.build_version }}
- name: Push image
uses: docker/build-push-action@v5
if: ${{ inputs.push_to_repository == 'yes' && steps.build.outputs.status == 0 }}
with:
context: .
target: vllm-openai
push: true
tags: ghcr.io/neuralmagic/nm-vllm-openai:${{ inputs.docker_tag }}
- name: Push image
uses: docker/build-push-action@v5
if: ${{ inputs.push_to_repository == 'yes' && steps.build.outputs.status == 0 }}
with:
context: .
target: vllm-openai
push: true
tags: ghcr.io/neuralmagic/nm-vllm-openai:${{ steps.tag.outputs.tag }}