THUDM / SwissArmyTransformer

SwissArmyTransformer is a flexible and powerful library to develop your own Transformer variants.

Home Page:https://THUDM.github.io/SwissArmyTransformer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在镜像中安装报错

xinyubai1209 opened this issue · comments

Collecting SwissArmyTransformer
Using cached SwissArmyTransformer-0.3.7-py3-none-any.whl (2.4 MB)
Requirement already satisfied: torch in /usr/local/lib/python3.8/site-packages (from SwissArmyTransformer) (1.13.1)
Requirement already satisfied: transformers in /usr/local/lib/python3.8/site-packages (from SwissArmyTransformer) (4.27.1)
Requirement already satisfied: sentencepiece in /usr/local/lib/python3.8/site-packages (from SwissArmyTransformer) (0.1.99)
Collecting tensorboardX
Using cached tensorboardX-2.6-py2.py3-none-any.whl (114 kB)
Collecting einops
Using cached einops-0.6.1-py3-none-any.whl (42 kB)
Requirement already satisfied: cpm-kernels in /usr/local/lib/python3.8/site-packages (from SwissArmyTransformer) (1.0.11)
Collecting datasets
Using cached datasets-2.12.0-py3-none-any.whl (474 kB)
Collecting deepspeed
Using cached deepspeed-0.9.3.tar.gz (807 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.0'
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-486ll747/deepspeed_c3e607a7d6854bbab1896908f44b2431/setup.py", line 119, in
os.environ["TORCH_CUDA_ARCH_LIST"] = get_default_compute_capabilities()
File "/tmp/pip-install-486ll747/deepspeed_c3e607a7d6854bbab1896908f44b2431/op_builder/builder.py", line 55, in get_default_compute_capabilities
if torch.utils.cpp_extension.CUDA_HOME is not None and installed_cuda_version()[0] >= 11:
File "/tmp/pip-install-486ll747/deepspeed_c3e607a7d6854bbab1896908f44b2431/op_builder/builder.py", line 43, in installed_cuda_version
output = subprocess.check_output([cuda_home + "/bin/nvcc", "-V"], universal_newlines=True)
File "/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.8/subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/cuda-11.0/bin/nvcc'
Setting ds_accelerator to cuda (auto detect)
[WARNING] Torch did not find cuda available, if cross-compiling or running with cpu only you can ignore this message. Adding compute capability for Pascal, Volta, and Turing (compute capabilities 6.0, 6.1, 6.2)
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: You are using pip version 22.0.4; however, version 23.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python3.8 -m pip install --upgrade pip' command.

请问'/usr/local/cuda/bin/nvcc'无法找到如何解决,安装该库有什么特殊要求吗

我也遇到了这个问题,求助

这个问题是安装deepspeed时报的的错误,是sat的依赖项。
一个思路是跳过deepspeed安装sat。
例如 pip install -i https://mirrors.aliyun.com/pypi/simple/ --no-deps "SwissArmyTransformer>=0.3.6"