mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 08:17:45 +01:00
Fix/citest timeout (#308)
* timeout for citest set to 240min * update docker image * fix ci template not packed in whl * update docker image version to 1.6.1 and add python3.8 support * randome choose a model for controlnet to avoid oom
This commit is contained in:
1
.github/workflows/citest.yaml
vendored
1
.github/workflows/citest.yaml
vendored
@@ -40,6 +40,7 @@ jobs:
|
||||
unittest:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: [modelscope-self-hosted]
|
||||
timeout-minutes: 240
|
||||
steps:
|
||||
- name: ResetFileMode
|
||||
shell: bash
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
recursive-include modelscope/configs *.py *.cu *.h *.cpp
|
||||
recursive-include modelscope/cli/template *.tpl
|
||||
|
||||
12
README.md
12
README.md
@@ -203,12 +203,20 @@ To allow out-of-box usage for all the models on ModelScope, official docker imag
|
||||
|
||||
CPU docker image
|
||||
```shell
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py37-torch1.11.0-tf1.15.5-1.3.0
|
||||
# py37
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py37-torch1.11.0-tf1.15.5-1.6.1
|
||||
|
||||
# py38
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py38-torch1.11.0-tf1.15.5-1.6.1
|
||||
```
|
||||
|
||||
GPU docker image
|
||||
```shell
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.3.0
|
||||
# py37
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.6.1
|
||||
|
||||
# py38
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py38-torch1.11.0-tf1.15.5-1.6.1
|
||||
```
|
||||
|
||||
## Setup Local Python Environment
|
||||
|
||||
12
README_zh.md
12
README_zh.md
@@ -189,12 +189,20 @@ ModelScope Library目前支持tensorflow,pytorch深度学习框架进行模型
|
||||
|
||||
CPU镜像
|
||||
```shell
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py37-torch1.11.0-tf1.15.5-1.3.0
|
||||
# py37
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py37-torch1.11.0-tf1.15.5-1.6.1
|
||||
|
||||
# py38
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-py38-torch1.11.0-tf1.15.5-1.6.1
|
||||
```
|
||||
|
||||
GPU镜像
|
||||
```shell
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.3.0
|
||||
# py37
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py37-torch1.11.0-tf1.15.5-1.6.1
|
||||
|
||||
# py38
|
||||
registry.cn-hangzhou.aliyuncs.com/modelscope-repo/modelscope:ubuntu20.04-cuda11.3.0-py38-torch1.11.0-tf1.15.5-1.6.1
|
||||
```
|
||||
|
||||
## 搭建本地Python环境
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) Alibaba, Inc. and its affiliates.
|
||||
import random
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
@@ -27,40 +28,13 @@ class ControllableImageGenerationTest(unittest.TestCase):
|
||||
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
|
||||
def test_run_with_model_from_modelhub(self):
|
||||
output_image_path = tempfile.NamedTemporaryFile(suffix='.png').name
|
||||
control_types = [
|
||||
'canny', 'hough', 'hed', 'depth', 'normal', 'pose', 'seg',
|
||||
'fake_scribble', 'scribble'
|
||||
]
|
||||
control_type = random.choice(control_types)
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='canny')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='hough')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='hed')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='depth')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='normal')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='pose')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='seg')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='fake_scribble')
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
|
||||
pipeline_ins = pipeline(
|
||||
self.task, model=self.model_id, control_type='scribble')
|
||||
self.task, model=self.model_id, control_type=control_type)
|
||||
output = pipeline_ins(input=self.input)[OutputKeys.OUTPUT_IMG]
|
||||
cv2.imwrite(output_image_path, output)
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user