This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
100 lines (88 loc) · 3.12 KB
/
publish-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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 }}