Docker-release/1.36-stable-build-3.12.13-by-@wangxingjun778 #370
This file contains hidden or 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: Build Docker Image | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| workflow_name: | |
| description: 'The specific name of this build' | |
| required: true | |
| default: 'build' | |
| modelscope_branch: | |
| description: 'ModelScope branch to build from(release/x.xx)' | |
| required: true | |
| image_type: | |
| description: 'The image type to build(base/old/stable/latest)' | |
| required: true | |
| modelscope_version: | |
| description: 'ModelScope version to use(x.xx.x)' | |
| required: true | |
| swift_branch: | |
| description: 'SWIFT branch to use(release/x.xx)' | |
| required: true | |
| ci_image: | |
| description: 'Set as the CI image' | |
| default: '0' | |
| required: false | |
| other_params: | |
| description: 'Other params in --xxx xxx' | |
| required: false | |
| python_version: | |
| description: 'Python version to use, default is 3.11.11' | |
| required: false | |
| default: '3.11.11' | |
| run-name: Docker-${{ inputs.modelscope_branch }}-${{ inputs.image_type }}-${{ inputs.workflow_name }}-${{ inputs.python_version }}-by-@${{ github.actor }} | |
| jobs: | |
| build: | |
| runs-on: [modelscope-self-hosted-us] | |
| steps: | |
| - name: ResetFileMode | |
| shell: bash | |
| run: | | |
| # reset filemode to allow action runner to delete files | |
| # generated by root in docker | |
| set -e | |
| source ~/.bashrc | |
| sudo chown -R $USER:$USER $ACTION_RUNNER_DIR | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.modelscope_branch }} | |
| - name: Build Docker Image | |
| run: | | |
| set -e | |
| source ~/.bashrc | |
| python docker/build_image.py --image_type ${{ github.event.inputs.image_type }} --python_version ${{ github.event.inputs.python_version }} --modelscope_branch ${{ github.event.inputs.modelscope_branch }} --modelscope_version ${{ github.event.inputs.modelscope_version }} --swift_branch ${{ github.event.inputs.swift_branch }} --ci_image ${{ github.event.inputs.ci_image }} ${{ github.event.inputs.other_params }} |