Open-Sora icon indicating copy to clipboard operation
Open-Sora copied to clipboard

pip install flash-attn --no-build-isolation出现问题

Open FlowersWithoutMoon opened this issue 1 year ago • 3 comments

已经安装CUDA CUDA_HOME系统变量设置正确 详细问题代码: Microsoft Windows [Version 10.0.26085.1] (c) Microsoft Corporation. All rights reserved.

C:\Windows\System32>d:

D:>cd D:\Software\Git\dates\Open-Sora\Open-Sora

D:\Software\Git\dates\Open-Sora\Open-Sora>conda activate opensora

(opensora) D:\Software\Git\dates\Open-Sora\Open-Sora>pip install flash-attn --no-build-isolation Collecting flash-attn Using cached flash_attn-2.5.6.tar.gz (2.5 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [20 lines of output] fatal: not a git repository (or any of the parent directories): .git C:\Users\Sailner\AppData\Local\Temp\pip-install-crd4m547\flash-attn_525f2ae5fda146ab913ca4079903eff7\setup.py:78: UserWarning: flash_attn was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc. warnings.warn( Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\Sailner\AppData\Local\Temp\pip-install-crd4m547\flash-attn_525f2ae5fda146ab913ca4079903eff7\setup.py", line 133, in CUDAExtension( File "D:\Software\Anaconda\envs\opensora\lib\site-packages\torch\utils\cpp_extension.py", line 1074, in CUDAExtension library_dirs += library_paths(cuda=True) File "D:\Software\Anaconda\envs\opensora\lib\site-packages\torch\utils\cpp_extension.py", line 1208, in library_paths paths.append(_join_cuda_home(lib_dir)) File "D:\Software\Anaconda\envs\opensora\lib\site-packages\torch\utils\cpp_extension.py", line 2407, in _join_cuda_home raise OSError('CUDA_HOME environment variable is not set. ' OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

  torch.__version__  = 2.2.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.

(opensora) D:\Software\Git\dates\Open-Sora\Open-Sora>

(opensora) D:\Software\Git\dates\Open-Sora\Open-Sora>

FlowersWithoutMoon avatar Mar 29 '24 06:03 FlowersWithoutMoon

检查是不是安装好cuda toolkit,使用nvcc命令,如果command not found就没安装(我安装好了之后nvcc仍然不能使用,指定环境变量就好了),然后再安装flash-attn应该就好了

forestemperor avatar Apr 01 '24 03:04 forestemperor

检查是不是安装好cuda toolkit,使用nvcc命令,如果command not found就没安装(我安装好了之后nvcc仍然不能使用,指定环境变量就好了),然后再安装flash-attn应该就好了

你好,我可以使用nvidia-smi,且可以正常推理。但是我无法安装flash-attn,一直在setup.py的环节,长达1小时,依旧没有构建好,你知道一些可能的原因吗?

Get-David avatar Apr 01 '24 11:04 Get-David

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar Apr 09 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Apr 16 '24 01:04 github-actions[bot]