Refactor Dockerfile (#1036)

This commit is contained in:
tastelikefeet
2024-10-21 18:26:23 +08:00
committed by GitHub
parent e320b40a0d
commit 320095144b
23 changed files with 578 additions and 679 deletions

48
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Build Docker Images
on:
workflow_dispatch:
inputs:
modelscope_branch:
description: 'ModelScope branch to build from'
required: true
image_type:
description: 'The image type to build'
required: true
modelscope_version:
description: 'ModelScope version to use'
required: true
swift_branch:
description: 'SWIFT branch to use'
required: true
torch_version:
description: 'Torch version to use'
required: false
torchvision_version:
description: 'Torchvision version to use'
required: false
cuda_version:
description: 'CUDA version to use'
required: false
torchaudio_version:
description: 'TorchAudio version to use'
required: false
vllm_version:
description: 'VLLM version to use'
required: false
lmdeploy_version:
description: 'LMDeploy version to use'
required: false
jobs:
build:
runs-on: [modelscope-self-hosted-us]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.modelscope_branch }}
- name: Build Docker Image
run: python docker/build_image.py --image_type ${{ github.event.inputs.image_type }} --modelscope_branch ${{ github.event.inputs.modelscope_branch }} --modelscope_version ${{ github.event.inputs.modelscope_version }} --swift_branch ${{ github.event.inputs.swift_branch }} --torch_version ${{ github.event.inputs.torch_version }} --torchvision_version ${{ github.event.inputs.torchvision_version }} --cuda_version ${{ github.event.inputs.cuda_version }} --torchaudio_version ${{ github.event.inputs.torchaudio_version }} --vllm_version ${{ github.event.inputs.vllm_version }} --lmdeploy_version ${{ github.event.inputs.lmdeploy_version }}