forked from kserve/kserve
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhuggingface-vllm-docker-publish-manual.yml
More file actions
73 lines (61 loc) · 1.99 KB
/
huggingface-vllm-docker-publish-manual.yml
File metadata and controls
73 lines (61 loc) · 1.99 KB
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
name: Huggingface vLLM Docker Publisher
on:
workflow_dispatch:
inputs:
version:
description: 'Huggingface vLLM image version to publish'
required: true
env:
IMAGE_NAME: huggingfaceserver
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
push:
strategy:
fail-fast: false
matrix:
image:
- version: ${{ inputs.version }}
path: 'python/huggingface_server_cpu.Dockerfile'
- version: ${{ inputs.version }}-gpu
path: 'python/huggingface_server.Dockerfile'
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
cache-binary: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Export image id and version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Add prefix v to version if it doesn't start with v
if [[ ${{ matrix.image.version }} != v* ]]; then
VERSION="v${{ matrix.image.version }}"
else
VERSION="${{ matrix.image.version }}"
fi
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
echo VERSION=$VERSION >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: python
file: ${{ matrix.image.path }}
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false
sbom: true