Files
modelscope/.github/workflows/docker-image.yml
Yunlin Mao 020cad8229 [Backport] Docker fixes from release/1.38 (#1735)
* Upgrade numpy to 2.x for 1.38 Docker images

- Replace deprecated numpy aliases (np.math.ceil → math.ceil, np.Inf → np.inf)
- Upgrade Docker constraints: numpy>=2.0, cython>=3.0, remove scipy upper bound

* Add ipywidgets dependency to Docker images

* update docker

* fix

* fix

* fix

* fix cpu image

* fix(docker): force numpy>=2.0 after evalscope install

ms-opencompass pulls numpy<2.0, downgrading numpy from 2.x to 1.26.4.
Force reinstall numpy>=2.0 after pip install .[eval] to restore it.

* add metax dockerfile and its requirements for ms-swift 4.2.x (#1734)

* Update npu dockerfile (#1736)

* fix(docker): remove unrelated added docker files

---------

Co-authored-by: Jintao Huang <huangjintao.hjt@alibaba-inc.com>
Co-authored-by: dwd <dwd1044898101@gmail.com>
Co-authored-by: addsubmuldiv <zyh13227@163.com>
2026-06-26 17:10:49 +08:00

61 lines
2.1 KiB
YAML

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.12.13'
required: false
default: '3.12.13'
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]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
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@v5
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 }}