Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
FROM registry.baidubce.com/paddlepaddle/paddle:2.3.2
RUN pip3.7 install --upgrade pip -i https://mirror.baidu.com/pypi/simple
RUN pip3.7 install paddlehub==2.3.1 --upgrade -i https://mirror.baidu.com/pypi/simple
CMD hub
错误信息:
Traceback (most recent call last):
File "/usr/local/bin/hub", line 5, in <module>
from paddlehub.commands.utils import execute
File "/usr/local/lib/python3.7/dist-packages/paddlehub/__init__.py", line 31, in <module>
from paddlehub import datasets
File "/usr/local/lib/python3.7/dist-packages/paddlehub/datasets/__init__.py", line 16, in <module>
from paddlehub.datasets.chnsenticorp import ChnSentiCorp
File "/usr/local/lib/python3.7/dist-packages/paddlehub/datasets/chnsenticorp.py", line 19, in <module>
from paddlehub.datasets.base_nlp_dataset import TextClassificationDataset
File "/usr/local/lib/python3.7/dist-packages/paddlehub/datasets/base_nlp_dataset.py", line 21, in <module>
import paddlenlp
File "/usr/local/lib/python3.7/dist-packages/paddlenlp/__init__.py", line 35, in <module>
from . import (
File "/usr/local/lib/python3.7/dist-packages/paddlenlp/data/__init__.py", line 16, in <module>
from .data_collator import *
File "/usr/local/lib/python3.7/dist-packages/paddlenlp/data/data_collator.py", line 26, in <module>
from ..transformers import BertTokenizer
File "/usr/local/lib/python3.7/dist-packages/paddlenlp/transformers/__init__.py", line 17, in <module>
from .model_utils import PretrainedModel, register_base_model
File "/usr/local/lib/python3.7/dist-packages/paddlenlp/transformers/model_utils.py", line 63, in <module>
from .generation_utils import GenerationMixin
File "/usr/local/lib/python3.7/dist-packages/paddlenlp/transformers/generation_utils.py", line 29, in <module>
from paddle.nn.layer.layers import in_declarative_mode
ModuleNotFoundError: No module named 'paddle.nn.layer.layers'
docker 部署 hubserving 启动hub启动报错
ModuleNotFoundError: No module named 'paddle.nn.layer.layers'
版本:
系统环境:
registry.baidubce.com/paddlepaddle/paddle:2.3.2
错误信息:
解决方法:
pip3.7 install paddlehub==2.3.1
会安装最新版本paddlenlp 2.6.0
将paddlenlp降级到2.5.2解决起因:
之前构建的镜像突然不能正常运行,可能和更新最新版本有关,不知道我这样构建镜像是否能锁定运行环境版本