mirror of
https://github.com/modelscope/modelscope.git
synced 2026-05-18 13:15:06 +02:00
Merge branch 'master' into release/1.35
This commit is contained in:
@@ -81,8 +81,7 @@ fi
|
||||
ARG CUR_TIME={cur_time}
|
||||
RUN echo $CUR_TIME
|
||||
|
||||
RUN curl -fsSL https://ollama.com/install.sh | sh && \
|
||||
pip install --no-cache-dir -U funasr scikit-learn && \
|
||||
RUN pip install --no-cache-dir -U funasr scikit-learn && \
|
||||
pip install --no-cache-dir -U qwen_vl_utils qwen_omni_utils librosa timm transformers accelerate peft trl safetensors && \
|
||||
cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b {swift_branch} --single-branch https://github.com/modelscope/ms-swift.git && \
|
||||
cd ms-swift && pip install .[llm] && \
|
||||
|
||||
@@ -6,7 +6,7 @@ ENV arch=x86_64
|
||||
|
||||
COPY docker/scripts/modelscope_env_init.sh /usr/local/bin/ms_env_init.sh
|
||||
RUN apt-get update && \
|
||||
apt-get install -y libsox-dev unzip libaio-dev zip iputils-ping telnet sudo git net-tools && \
|
||||
apt-get install -y libsox-dev unzip libaio-dev zip iputils-ping telnet sudo git net-tools zstd libzstd-dev && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ class Builder:
|
||||
args.torch_version = '2.9.1'
|
||||
args.torchaudio_version = '2.9.1'
|
||||
args.torchvision_version = '0.24.1'
|
||||
if not args.optimum_version:
|
||||
args.optimum_version = '2.0.0'
|
||||
if not args.tf_version:
|
||||
args.tf_version = '2.16.1'
|
||||
if not args.cuda_version:
|
||||
@@ -341,7 +343,7 @@ RUN pip install --no-cache-dir -U icecream soundfile pybind11 py-spy
|
||||
version_args = (
|
||||
f'{self.args.torch_version} {self.args.torchvision_version} {self.args.torchaudio_version} '
|
||||
f'{self.args.vllm_version} {self.args.lmdeploy_version} {self.args.autogptq_version} '
|
||||
f'{self.args.flashattn_version}')
|
||||
f'{self.args.flashattn_version} {self.args.optimum_version}')
|
||||
with open('docker/Dockerfile.ubuntu', 'r') as f:
|
||||
content = f.read()
|
||||
content = content.replace('{base_image}', self.args.base_image)
|
||||
@@ -406,7 +408,7 @@ RUN pip install --no-cache-dir -U icecream soundfile pybind11 py-spy
|
||||
"""
|
||||
version_args = (
|
||||
f'{self.args.torch_version} {self.args.torchvision_version} {self.args.torchaudio_version} '
|
||||
f'{self.args.vllm_version} {self.args.lmdeploy_version} {self.args.autogptq_version} '
|
||||
f'{self.args.vllm_version} {self.args.lmdeploy_version} {self.args.autogptq_version} {self.args.optimum_version}'
|
||||
f'{self.args.flashattn_version}')
|
||||
with open('docker/Dockerfile.ubuntu', 'r') as f:
|
||||
content = f.read()
|
||||
@@ -496,6 +498,7 @@ parser.add_argument('--vllm_version', type=str, default=None)
|
||||
parser.add_argument('--lmdeploy_version', type=str, default=None)
|
||||
parser.add_argument('--flashattn_version', type=str, default=None)
|
||||
parser.add_argument('--autogptq_version', type=str, default=None)
|
||||
parser.add_argument('--optimum_version', type=str, default=None)
|
||||
parser.add_argument('--modelscope_branch', type=str, default='master')
|
||||
parser.add_argument('--modelscope_version', type=str, default='9.99.0')
|
||||
parser.add_argument('--swift_branch', type=str, default='main')
|
||||
|
||||
@@ -7,6 +7,7 @@ vllm_version=${4:-0.6.0}
|
||||
lmdeploy_version=${5:-0.6.1}
|
||||
autogptq_version=${6:-0.7.1}
|
||||
flashattn_version=${7:-2.7.1.post4}
|
||||
optimum_version=${8:-2.0.0}
|
||||
|
||||
pip uninstall -y torch torchvision torchaudio
|
||||
|
||||
@@ -23,6 +24,8 @@ MAX_JOBS=16 pip install --no-cache-dir flash_attn==$flashattn_version --no-build
|
||||
|
||||
pip install --no-cache-dir triton -U && pip cache purge
|
||||
|
||||
pip install --no-cache-dir optimum==$optimum_version
|
||||
|
||||
if [[ "$(printf '%s\n' "0.6.0" "$vllm_version" | sort -V | head -n1)" = "0.6.0" ]]; then
|
||||
# vllm_version is >= 0.6.0
|
||||
pip install --no-cache-dir vllm==$vllm_version && pip cache purge
|
||||
|
||||
Reference in New Issue
Block a user