You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker环境中使用pip安装modelscope在某些服务器会出现cannot import name '_datasets_server' from 'datasets.utils' (/usr/local/lib/python3.8/dist-packages/datasets/utils/__init__.py)错误
#841
Open
lydia7777777 opened this issue
Apr 24, 2024
· 3 comments
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from modelscope.utils.constant import Tasks
2024-04-24 14:47:30,503 - modelscope - INFO - PyTorch version 1.13.1+cu116 Found.
2024-04-24 14:47:30,504 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2024-04-24 14:47:30,548 - modelscope - INFO - Loading done! Current index file version is 1.13.3, with md5 044a8f5dcefc3d184ee392721fd6f58c and a total number of 972 components indexed
from modelscope.pipelines import pipeline
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/dist-packages/modelscope/pipelines/init.py", line 4, in
from .base import Pipeline
File "/usr/local/lib/python3.8/dist-packages/modelscope/pipelines/base.py", line 16, in
from modelscope.msdatasets import MsDataset
File "/usr/local/lib/python3.8/dist-packages/modelscope/msdatasets/init.py", line 2, in
from .ms_dataset import MsDataset
File "/usr/local/lib/python3.8/dist-packages/modelscope/msdatasets/ms_dataset.py", line 24, in
from modelscope.msdatasets.utils.hf_datasets_util import
File "/usr/local/lib/python3.8/dist-packages/modelscope/msdatasets/utils/hf_datasets_util.py", line 42, in
from datasets.utils import _datasets_server, file_utils
ImportError: cannot import name '_datasets_server' from 'datasets.utils' (/usr/local/lib/python3.8/dist-packages/datasets/utils/init.py)
To Reproduce
run python3
Your Environments (required)
OS: CentOS Linux release 7.9.2009 (Core) ,Linux localhost.localdomain 3.10.0-1160.el7.x86_64 feat: add citest #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
CPU: Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz
Docker version 20.10.7, build f0df350
NVIDIA-SMI 535.161.08 Driver Version: 535.161.08 CUDA Version: 12.2
Dockerfile:
FROM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04
WORKDIR /home/cloud
LABEL maintainer=“cloud"
ARG DEBIAN_FRONTEND=noninteractive
USER root
apt
RUN apt-get update &&
apt-get install -y vim apt-utils curl libpq-dev tzdata net-tools wget libgl1-mesa-glx libglib2.0-0
timezone
ENV LANG C.UTF-8
ENV TZ Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN dpkg-reconfigure --frontend noninteractive tzdata
python
ARG PIP_MIRROR=https://mirrors.aliyun.com/pypi/simple/
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
RUN apt install python3.8 -y
RUN apt install python3-pip -y
RUN python3 -m pip install -i $PIP_MIRROR --no-cache-dir --upgrade pip
Describe the bug
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
To Reproduce
run python3
Your Environments (required)
FROM nvidia/cuda:12.0.0-cudnn8-runtime-ubuntu20.04
WORKDIR /home/cloud
LABEL maintainer=“cloud"
ARG DEBIAN_FRONTEND=noninteractive
USER root
apt
RUN apt-get update &&
apt-get install -y vim apt-utils curl libpq-dev tzdata net-tools wget libgl1-mesa-glx libglib2.0-0
timezone
ENV LANG C.UTF-8
ENV TZ Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN dpkg-reconfigure --frontend noninteractive tzdata
python
ARG PIP_MIRROR=https://mirrors.aliyun.com/pypi/simple/
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
RUN apt install python3.8 -y
RUN apt install python3-pip -y
RUN python3 -m pip install -i $PIP_MIRROR --no-cache-dir --upgrade pip
https://pytorch.org/get-started/previous-versions/
RUN pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
RUN python3 -m pip install --no-cache-dir modelscope -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir supervisor -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir opencv-python -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir uvicorn -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir fastapi -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir prettytable -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir yacs -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir pattern_singleton -i $PIP_MIRROR
RUN python3 -m pip install --no-cache-dir Cython -i $PIP_MIRROR
Pipeline related: @Firmament-cyou @wenmengzhou
The text was updated successfully, but these errors were encountered: