Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install on Windows 11- No such file or directory: 'bin\\deepspeed.bat' #6923

Open
nitinmukesh opened this issue Jan 2, 2025 · 7 comments
Assignees
Labels

Comments

@nitinmukesh
Copy link

nitinmukesh commented Jan 2, 2025

Windows 11 / python 3.10.11/ Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30157 for x64 / cmake version 3.31.0 / C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4

(venv) C:\ai1\ConsisID-preview-Space>pip list
Package                 Version
----------------------- ------------
absl-py                 2.1.0
accelerate              1.1.1
aiofiles                23.2.1
albucore                0.0.23
albumentations          1.4.24
annotated-types         0.7.0
anyio                   4.7.0
asttokens               3.0.0
cachetools              5.5.0
certifi                 2024.12.14
charset-normalizer      3.4.1
click                   8.1.8
colorama                0.4.6
coloredlogs             15.0.1
comm                    0.2.2
consisid_eva_clip       1.0.2
contourpy               1.3.1
cycler                  0.12.1
Cython                  3.0.11
decorator               5.1.1
decord                  0.6.0
diffusers               0.33.0.dev0
docker-pycreds          0.4.0
easydict                1.13
einops                  0.8.0
exceptiongroup          1.2.2
executing               2.1.0
facexlib                0.3.0
fastapi                 0.115.6
ffmpy                   0.5.0
filelock                3.16.1
filterpy                1.4.5
flatbuffers             24.12.23
fonttools               4.55.3
fsspec                  2024.12.0
ftfy                    6.3.1
func-timeout            4.3.5
gitdb                   4.0.12
GitPython               3.1.44
gradio                  5.9.1
gradio_client           1.5.2
grpcio                  1.68.1
h11                     0.14.0
httpcore                1.0.7
httpx                   0.28.1
huggingface-hub         0.26.1
humanfriendly           10.0
idna                    3.10
imageio                 2.36.1
imageio-ffmpeg          0.5.1
importlib_metadata      8.5.0
insightface             0.7.3
ipython                 8.31.0
ipywidgets              8.1.5
jedi                    0.19.2
Jinja2                  3.1.5
joblib                  1.4.2
jupyterlab_widgets      3.0.13
kiwisolver              1.4.8
lazy_loader             0.4
llvmlite                0.43.0
Markdown                3.7
markdown-it-py          3.0.0
MarkupSafe              2.1.5
matplotlib              3.10.0
matplotlib-inline       0.1.7
mdurl                   0.1.2
moviepy                 2.1.1
mpmath                  1.3.0
networkx                3.4.2
numba                   0.60.0
numpy                   1.26.4
nvidia-ml-py            12.560.30
nvitop                  1.4.0
onnx                    1.17.0
onnxruntime-gpu         1.19.2
opencv-python           4.10.0.84
opencv-python-headless  4.10.0.84
orjson                  3.10.13
packaging               24.2
pandas                  2.2.3
parso                   0.8.4
peft                    0.12.0
pillow                  10.4.0
pip                     23.0.1
platformdirs            4.3.6
prettytable             3.12.0
proglog                 0.1.10
prompt_toolkit          3.0.48
protobuf                5.29.2
psutil                  5.9.8
pure_eval               0.2.3
pydantic                2.10.4
pydantic_core           2.27.2
pydub                   0.25.1
pyfacer                 0.0.4
Pygments                2.18.0
pyparsing               3.2.1
pyreadline3             3.5.4
python-dateutil         2.9.0.post0
python-dotenv           1.0.1
python-multipart        0.0.20
pytz                    2024.2
PyYAML                  6.0.2
regex                   2024.11.6
requests                2.32.3
rich                    13.9.4
ruff                    0.8.5
safehttpx               0.1.6
safetensors             0.4.5
scikit-image            0.25.0
scikit-learn            1.6.0
scikit-video            1.1.11
scipy                   1.14.1
semantic-version        2.10.0
sentencepiece           0.2.0
sentry-sdk              2.19.2
setproctitle            1.3.4
setuptools              65.5.0
shellingham             1.5.4
simsimd                 6.2.1
six                     1.17.0
smmap                   5.0.2
sniffio                 1.3.1
spaces                  0.31.1
spandrel                0.4.0
stack-data              0.6.3
starlette               0.41.3
stringzilla             3.11.3
sympy                   1.13.1
tensorboard             2.17.1
tensorboard-data-server 0.7.2
termcolor               2.5.0
threadpoolctl           3.5.0
tifffile                2024.12.12
timm                    1.0.9
tokenizers              0.20.1
tomlkit                 0.13.2
torch                   2.5.1+cu124
torchaudio              2.5.1+cu124
torchvision             0.20.1+cu124
tqdm                    4.67.1
traitlets               5.14.3
transformers            4.46.3
typer                   0.15.1
typing_extensions       4.12.2
tzdata                  2024.2
urllib3                 2.3.0
uvicorn                 0.34.0
validators              0.34.0
wandb                   0.19.1
wcwidth                 0.2.13
websockets              14.1
Werkzeug                3.1.3
wheel                   0.45.1
widgetsnbextension      4.0.13
windows-curses          2.4.0
xformers                0.0.29.post1
zipp                    3.21.0

(venv) C:\ai1\ConsisID-preview-Space>echo %CUDA_PATH%
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4

(venv) C:\ai1\ConsisID-preview-Space>set DS_BUILD_CUTLASS_OPS=0

(venv) C:\ai1\ConsisID-preview-Space>set  DS_BUILD_RAGGED_DEVICE_OPS=0

(venv) C:\ai1\ConsisID-preview-Space>set DS_BUILD_EVOFORMER_ATTN=0

(venv) C:\ai1\ConsisID-preview-Space>pip install deepspeed
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting deepspeed
  Downloading deepspeed-0.16.2.tar.gz (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 15.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: einops in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (0.8.0)
Collecting hjson
  Downloading hjson-3.1.0-py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB ? eta 0:00:00
Collecting msgpack
  Downloading msgpack-1.1.0-cp310-cp310-win_amd64.whl (74 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.7/74.7 kB ? eta 0:00:00
Collecting ninja
  Downloading ninja-1.11.1.3-py3-none-win_amd64.whl (296 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 296.5/296.5 kB ? eta 0:00:00
Requirement already satisfied: numpy in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (1.26.4)
Requirement already satisfied: packaging>=20.0 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (24.2)
Requirement already satisfied: psutil in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (5.9.8)
Collecting py-cpuinfo
  Downloading py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)
Requirement already satisfied: pydantic>=2.0.0 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (2.10.4)
Requirement already satisfied: torch in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (2.5.1+cu124)
Requirement already satisfied: tqdm in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (4.67.1)
Requirement already satisfied: nvidia-ml-py in c:\ai1\consisid-preview-space\venv\lib\site-packages (from deepspeed) (12.560.30)
Requirement already satisfied: annotated-types>=0.6.0 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from pydantic>=2.0.0->deepspeed) (0.7.0)
Requirement already satisfied: typing-extensions>=4.12.2 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from pydantic>=2.0.0->deepspeed) (4.12.2)
Requirement already satisfied: pydantic-core==2.27.2 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from pydantic>=2.0.0->deepspeed) (2.27.2)
Requirement already satisfied: networkx in c:\ai1\consisid-preview-space\venv\lib\site-packages (from torch->deepspeed) (3.4.2)
Requirement already satisfied: filelock in c:\ai1\consisid-preview-space\venv\lib\site-packages (from torch->deepspeed) (3.16.1)
Requirement already satisfied: sympy==1.13.1 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from torch->deepspeed) (1.13.1)
Requirement already satisfied: jinja2 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from torch->deepspeed) (3.1.5)
Requirement already satisfied: fsspec in c:\ai1\consisid-preview-space\venv\lib\site-packages (from torch->deepspeed) (2024.12.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from sympy==1.13.1->torch->deepspeed) (1.3.0)
Requirement already satisfied: colorama in c:\ai1\consisid-preview-space\venv\lib\site-packages (from tqdm->deepspeed) (0.4.6)
Requirement already satisfied: MarkupSafe>=2.0 in c:\ai1\consisid-preview-space\venv\lib\site-packages (from jinja2->torch->deepspeed) (2.1.5)
Building wheels for collected packages: deepspeed
  Building wheel for deepspeed (setup.py) ... /

@nitinmukesh
Copy link
Author

996: 'pruneInfo_t': The type will be removed in the next major release
      "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\nvcc" -c csrc/transformer/gelu_kernels.cu -o build\temp.win-amd64-cpython-310\Release\csrc/transformer/gelu_kernels.obj -IC:\Users\nitin\AppData\Local\Temp\pip-install-iupzjih7\deepspeed_7af09ca09a454528bab07fb8a985e5d0\csrc\includes -IC:\ai1\ConsisID-preview-Space\venv\lib\site-packages\torch\include -IC:\ai1\ConsisID-preview-Space\venv\lib\site-packages\torch\include\torch\csrc\api\include -IC:\ai1\ConsisID-preview-Space\venv\lib\site-packages\torch\include\TH -IC:\ai1\ConsisID-preview-Space\venv\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\include" -IC:\ai1\ConsisID-preview-Space\venv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -O3 -allow-unsupported-compiler --use_fast_math -std=c++17 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ --threads=8 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_90,code=sm_90 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=transformer_op -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 --use-local-env
      gelu_kernels.cu
      cl : Command line warning D9025 : overriding '/D__CUDA_NO_HALF_OPERATORS__' with '/U__CUDA_NO_HALF_OPERATORS__'
...............................

      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared\rpcndr.h(742): warning #108-D: signed bit field of length 1
            int                             fNeedMCCP         :1;
                                            ^

      tmpxft_00005058_00000000-7_transform_kernels.compute_90.cudafe1.cpp
      "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ai1\ConsisID-preview-Space\venv\lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\lib\x64" /LIBPATH:C:\ai1\ConsisID-preview-Space\venv\libs "/LIBPATH:C:\Program Files\Python310\libs" "/LIBPATH:C:\Program Files\Python310" /LIBPATH:C:\ai1\ConsisID-preview-Space\venv\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64" cublas.lib curand.lib c10.lib torch.lib torch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda.lib /EXPORT:PyInit_stochastic_transformer_op build\temp.win-amd64-cpython-310\Release\csrc/transformer/cublas_wrappers.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/dropout_kernels.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/ds_transformer_cuda.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/gelu_kernels.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/general_kernels.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/normalize_kernels.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/softmax_kernels.obj build\temp.win-amd64-cpython-310\Release\csrc/transformer/transform_kernels.obj /OUT:build\lib.win-amd64-cpython-310\deepspeed\ops\transformer\stochastic_transformer_op.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-310\Release\csrc/transformer\stochastic_transformer_op.cp310-win_amd64.lib -lcurand
      LINK : warning LNK4044: unrecognized option '/lcurand'; ignored
         Creating library build\temp.win-amd64-cpython-310\Release\csrc/transformer\stochastic_transformer_op.cp310-win_amd64.lib and object build\temp.win-amd64-cpython-310\Release\csrc/transformer\stochastic_transformer_op.cp310-win_amd64.exp
      Generating code
      Finished generating code
      running build_scripts
      creating build\scripts-3.10
      error: [Errno 2] No such file or directory: 'bin\\deepspeed.bat'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for deepspeed
  Running setup.py clean for deepspeed
Failed to build deepspeed
Installing collected packages: py-cpuinfo, hjson, ninja, msgpack, deepspeed
  Running setup.py install for deepspeed ... |

@nitinmukesh nitinmukesh changed the title Can't install on Windows 11 Can't install on Windows 11- No such file or directory: 'bin\\deepspeed.bat' Jan 2, 2025
@loadams
Copy link
Contributor

loadams commented Jan 2, 2025

Hi @nitinmukesh - can you please share your repro steps, it looks like you are installing via the build_win.bat script after cloning the repo, but wanted to be sure.

@loadams loadams self-assigned this Jan 2, 2025
@loadams loadams added the windows label Jan 2, 2025
@nitinmukesh
Copy link
Author

nitinmukesh commented Jan 2, 2025

Hello @loadams.
Happy new year.

I am installing this tool which requires deepspeed
https://huggingface.co/spaces/BestWishYsh/ConsisID-preview-Space

I build the VE in python 3.10.11 using python -m venv venv and installed the dependencies using requirements.txt

I executed the following (as mentioned in README) after all the requirements are installed in virtual environment

(venv) C:\ai1\ConsisID-preview-Space>set DS_BUILD_CUTLASS_OPS=0

(venv) C:\ai1\ConsisID-preview-Space>set  DS_BUILD_RAGGED_DEVICE_OPS=0

(venv) C:\ai1\ConsisID-preview-Space>set DS_BUILD_EVOFORMER_ATTN=0

(venv) C:\ai1\ConsisID-preview-Space>pip install deepspeed

I have included all details in my 1st and 2nd post, please let me know if more information is needed.

[EDIT]
I tried with CUDA 12.1 as well, same issue. I just want to use the inference.
I got the missing DSkernel error for the first time for which I set the 3 env variables as shown above and that issue disappeared.

[EDIT 2]
The requirements.txt says deepspeed==0.15.2 but I was unable to install that as well.

[EDIT 3]
I am not using build_win.bat but it also have the same issue reported by another user
#6915

I referred to https://github.com/microsoft/DeepSpeed/blob/master/blogs/windows/08-2024/README.md#installing-via-pip

@nitinmukesh
Copy link
Author

nitinmukesh commented Jan 2, 2025

Let me list all the command used on Windows command prompt (not powershell)

git lfs install

git clone https://huggingface.co/spaces/BestWishYsh/ConsisID-preview-Space

cd ConsisID-preview-Space

python -m venv venv

venv\scripts\activate

remove deepspeed from requirements.txt and add --extra-index-url https://download.pytorch.org/whl/cu124 at the top of requirements.txt

pip install wheel

pip install -r requirements.txt

----Till here success-----

pip install deepspeed

@loadams
Copy link
Contributor

loadams commented Jan 3, 2025

Hi @nitinmukesh - The HF space appears to be not loading for me, so I can't tell why they need a specific DeepSpeed version. If you are on Windows and need DeepSpeed, the latest version we have a published whl of is 0.15.0, listed here. You should be able to specify pip install deepspeed==0.15.0 and if your platform is setup properly on Windows, pip will pull that version. However, that version was built with python 3.11, so you'd need to use that in your venv in order to get that to work, though that should solve your immediate problem.

We are working on improving the Windows support, but that's likely what would help you for now. Otherwise, you might need to check if the creator of that space has any information on their config for DeepSpeed with 0.15.2+.

@loadams
Copy link
Contributor

loadams commented Jan 3, 2025

@nitinmukesh - I found their GitHub here: https://github.com/PKU-YuanGroup/ConsisID - they don't explicitly mention Windows support or testing, so I think they did everything on linux, given their pinned DeepSpeed version in the requirements file. You can try with 0.15.0 and see if it works.

@nitinmukesh
Copy link
Author

nitinmukesh commented Jan 4, 2025

I am not sure if it has to do anything with that project.

I created an empty folder

python -m venv venv

venv\scripts\activate

pip install wheel

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

pip install deepspeed

Same error :(

      LINK : warning LNK4044: unrecognized option '/lcurand'; ignored
         Creating library build\temp.win-amd64-cpython-310\Release\csrc/transformer\stochastic_transformer_op.cp310-win_amd64.lib and object build\temp.win-amd64-cpython-310\Release\csrc/transformer\stochastic_transformer_op.cp310-win_amd64.exp
      Generating code
      Finished generating code
      running build_scripts
      creating build\scripts-3.10
      error: [Errno 2] No such file or directory: 'bin\\deepspeed.bat'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for deepspeed
  Running setup.py clean for deepspeed
Failed to build deepspeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants