From 169f52308268e60bddb4e19a2785f7cb473c0f39 Mon Sep 17 00:00:00 2001 From: tastelikefeet <58414341+tastelikefeet@users.noreply.github.com> Date: Mon, 11 Aug 2025 11:04:17 +0800 Subject: [PATCH 1/3] fix tensorflow cannot load gpu (#1456) --- docker/build_image.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/build_image.py b/docker/build_image.py index bfef7be5..e1b6ca14 100644 --- a/docker/build_image.py +++ b/docker/build_image.py @@ -204,11 +204,15 @@ class GPUImageBuilder(Builder): def generate_dockerfile(self) -> str: meta_file = './docker/install.sh' + # pushd ~ popd is to solve the tf cannot use gpu problem. extra_content = """ RUN pip install tf-keras==2.16.0 --no-dependencies && \ pip install --no-cache-dir torchsde jupyterlab torchmetrics==0.11.4 basicsr pynvml shortuuid && \ CUDA_HOME=/usr/local/cuda TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0" \ pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git' +RUN pushd $(dirname $(python -c 'print(__import__("tensorflow").__file__)')) && \ + ln -svf ../nvidia/*/lib/*.so* . && \ + popd """ version_args = ( From 1fdfb0e2e1b13d1a565105a701247a9feb08a888 Mon Sep 17 00:00:00 2001 From: tastelikefeet <58414341+tastelikefeet@users.noreply.github.com> Date: Mon, 11 Aug 2025 11:17:57 +0800 Subject: [PATCH 2/3] update python version --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ca2d325b..997dab0b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -27,9 +27,9 @@ on: description: 'Other params in --xxx xxx' required: false python_version: - description: 'Python version to use, default is 3.10.14' + description: 'Python version to use, default is 3.11.11' required: false - default: '3.10.14' + default: '3.11.11' run-name: Docker-${{ inputs.modelscope_branch }}-${{ inputs.image_type }}-${{ inputs.workflow_name }}-${{ inputs.python_version }}-by-@${{ github.actor }} From 179b7622549074d5e50667275f6c59d9f3dcf67a Mon Sep 17 00:00:00 2001 From: "Xingjun.Wang" Date: Tue, 12 Aug 2025 11:02:40 +0800 Subject: [PATCH 3/3] Add `create` cli warning (#1458) --- modelscope/cli/create.py | 2 -- modelscope/hub/api.py | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modelscope/cli/create.py b/modelscope/cli/create.py index c3344e80..cb51e592 100644 --- a/modelscope/cli/create.py +++ b/modelscope/cli/create.py @@ -153,8 +153,6 @@ class CreateCMD(CLICommand): endpoint=self.args.endpoint, ) - print(f'Successfully created the repo: {self.args.repo_id}.') - def _create_aigc_model(self): """Execute the command.""" api = HubApi(endpoint=self.args.endpoint) diff --git a/modelscope/hub/api.py b/modelscope/hub/api.py index 203fa8d1..432317f9 100644 --- a/modelscope/hub/api.py +++ b/modelscope/hub/api.py @@ -1538,7 +1538,9 @@ class HubApi: repo_exists: bool = self.repo_exists(repo_id, repo_type=repo_type, endpoint=endpoint, token=token) if repo_exists: if exist_ok: - return f'{endpoint}/{repo_type}s/{repo_id}' + repo_url: str = f'{endpoint}/{repo_type}s/{repo_id}' + logger.warning(f'Repo {repo_id} already exists, got repo url: {repo_url}') + return repo_url else: raise ValueError(f'Repo {repo_id} already exists!')