k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.08k stars 211 forks source link

K2 installation on Windowd #1256

Open AlexandderGorodetski opened 8 months ago

AlexandderGorodetski commented 8 months ago

Guys is it possible to install icefall on windows ?

csukuangfj commented 8 months ago

Yes.

Are you having any issues with the installation? If yes, please post detailed error logs.

mc-marcocheng commented 8 months ago

@csukuangfj I ran into the following error when building k2: https://gist.github.com/mc-marcocheng/badc1cbaee2ceaa05a6c304439899e29

csukuangfj commented 8 months ago

@csukuangfj I ran into the following error when building k2: https://gist.github.com/mc-marcocheng/badc1cbaee2ceaa05a6c304439899e29

@mc-marcocheng Thanks for posting the detailed error logs.

Please try #1257

AlexandderGorodetski commented 7 months ago

Hello guys.

I am trying to install icefall on Windows.

I was able to run following installation

pip install torch==1.13.0+cu116 torchaudio==0.13.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html

But I got a problem with following installation

pip install k2==1.24.3.dev20230725+cuda11.6.torch1.13.0 -f https://k2-fsa.github.io/k2/cuda.html Looking in links: https://k2-fsa.github.io/k2/cuda.html ERROR: Ignored the following yanked versions: 0.0.1.dev0 ERROR: Could not find a version that satisfies the requirement k2==1.24.3.dev20230725+cuda11.6.torch1.13.0 (from versions: 0.0.2.dev0, 0.0.3.dev20201019, 0.0.3.dev20201020, 0.0.3.dev20201025, 0.0.3.dev20201027, 0.0.4.dev20201027, 0.0.5.dev20201027, 0.0.5.dev20201028, 0.0.6.dev20201028, 0.0.7.dev20201028, 0.0.9.dev20201109, 0.0.10.dev20201110, 0.1, 0.1.1.dev20201116, 0.1.1.dev20201118, 0.1.1.dev20201130, 0.1.1.dev20201208, 0.1.1.dev20201210, 0.1.1.dev20201212, 0.1.1.dev20201216, 0.1.2.dev20210111, 0.1.2, 0.1.3.dev20210111, 0.3.0, 0.3.1.dev20210121, 0.3.1.dev20210127, 0.3.1.dev20210204, 0.3.2.dev20210204, 0.3.3.dev20210205, 0.3.3.dev20210206, 0.3.3.dev20210209, 0.3.3.dev20210218, 0.3.3.dev20210222, 0.3.3.dev20210224, 0.3.3.dev20210302, 0.3.3.dev20210305, 0.3.3.dev20210309, 0.3.3.dev20210321, 0.3.3.dev20210328, 0.3.3.dev20210331, 0.3.3.dev20210409, 0.3.3.dev20210411, 0.3.3.dev20210415, 0.3.3.dev20210421, 0.3.3.dev20210425, 0.3.3.dev20210426, 0.3.3.dev20210501, 0.3.4.dev20210511, 0.3.4.dev20210512, 0.3.4.dev20210515, 0.3.5.dev20210605, 0.3.5.dev20210606, 0.3.5.dev20210608, 0.3.5, 1.0.dev20210617, 1.0.dev20210619, 1.0, 1.1.dev20210706, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9.dev20211024, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.15.1, 1.16, 1.17, 1.18, 1.19, 1.22, 1.23.1, 1.23.2, 1.23.3, 1.23.4) ERROR: No matching distribution found for k2==1.24.3.dev20230725+cuda11.6.torch1.13.0

Same commands on Linux are working fine.

Could you help please.

What am I doing wrong?

csukuangfj commented 7 months ago

we don't provide cuda-enabled wheels for windows. Please install k2 form source with cuda support on windows.

AlexandderGorodetski commented 7 months ago

Guys, I have troubles with installation of GCC on windows. There are some ways to install it. But it seems that it is installed in some dedicated terminal and I cannot see it installed in terminal of windows. Any help is appreciated.

csukuangfj commented 7 months ago

please install msvc via visual studio 2022.

AlexandderGorodetski commented 7 months ago

Thank you so much. I have a question regarding installation of cuda and cudnn. I have nvidia-smi installed on my windows. It means that gpu drivers were installed. Maybe it is enough?

but nvcc is not available on my computer. So I guess that I have to install cuda and cudnn. Guys , in your tutorial you have great explanation about how cuda and cudnn should be installed on Linux , but I do not see there explanation about installing cuda and cudnn on windows. I found that I can install cuda and cudnn on windows using Nvidia site but I am not sure about it. What is yours recommendation please?

csukuangfj commented 7 months ago

I found that I can install cuda and cudnn on windows using Nvidia site but I am not sure about it. What is yours recommendation please?

Sorry that we don't have experience about installing cudatoolkit and cudnn on windows.

I suggest that you search with google for that.

AlexandderGorodetski commented 7 months ago

Guys, is there someone in the forum that was able to install K2 under Windows?

mc-marcocheng commented 7 months ago

These are some python package installation basics:

  1. Install msvc.
  2. Install miniconda.
  3. Create a python environment with miniconda: conda create -n env python=3.10 -y; conda activate env
  4. conda install cudatoolkit cudnn -c conda-forge -y
  5. Install PyTorch with version that matches the CUDA version installed on your system
  6. pip install git+https://github.com/k2-fsa/k2
csukuangfj commented 7 months ago

Guys, is there someone in the forum that was able to install K2 under Windows?

Yes, I think @mc-marcocheng has done that. Please follow https://github.com/k2-fsa/k2/issues/1256#issuecomment-1839107455

AlexandderGorodetski commented 7 months ago

Hello @mc-marcocheng , is that crucial to use miniconda or using of Anaconda is OK too ?

AlexandderGorodetski commented 7 months ago

@mc-marcocheng , what torch and torchaudio versions should be installed on windows?

mc-marcocheng commented 7 months ago

@AlexandderGorodetski Anaconda is OK. PyTorch version needs to match the CUDA version installed on your system.