"采用的Python3.10的版本 基础镜像 docker pull registry.baidubce.com/paddlepaddle/paddle:2.6.1
增加包
pip install paddlenlp
pip install flask
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install modelscope
pip install transformers
可以正常运行
modelscope中,docker commit 源镜像id 新镜像
报错怎么解决? :During ast indexing the file /usr/local/lib/python3.10/dist-packages/modelscope/models/base/base_torch_head.py, a related error excepted in the file /usr/local/lib/python3.10/dist-packages/modelscope/utils/ast_utils.py at line: 152: ""attr = getattr(node, field)"" with error msg: ""AttributeError: 'ClassDef' object has no attribute 'type_params'"", please double check the origin file /usr/local/lib/python3.10/dist-packages/modelscope/models/base/base_torch_head.py to see whether the file is correctly edited.
"
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352