开发者社区 > ModelScope模型即服务 > 正文

modelscope中,docker commit 源镜像id 新镜像 报错怎么解决?

"采用的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. 8a07760e0663a651d7d694176e642157.png
b7b8569f7ba398cec7743d27b2b2add0.png
d4989ba22eb54dde8125e71c41ada1ea.png
"

展开
收起
小小爱吃香菜 2024-07-02 16:19:41 24 0
1 条回答
写回答
取消 提交回答
  • 不装modelscope,torch您用2.3.0。此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”

    2024-07-02 16:39:36
    赞同 2 展开评论 打赏

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352

相关电子书

更多
应用 Docker 进行持续交付:用技术改变交付路程 立即下载
从Docker到容器服务 立即下载
Docker@Alibaba——超大规模Docker化的实战经验 立即下载

相关实验场景

更多