How do I make CUDA available on Windows 10+Anaconda?

Asked 1 years ago, Updated 1 years ago, 61 views

I didn't get a response from Teratail, so I'm posting it here.

I would like to move the AI image generation package called BigSleep.
I installed the latest version of Anaconda 3.9 on Windows 10 (with RTX 2060 Super) and tried to install it from the command prompt as follows, but it failed.

$conda create-npainter
$ conda activate paint
$ conda install python==3.6.10
$ conda install cudnn=7.6.5=cuda10.0_0
$ python-mpip install --upgrade pip setuptools
$ pip install big-sleep
$ dream "apyramid made of ice"
Traceback (most recent call last):
  File "C:\Users\hoge\anaconda3\envs\painter\lib\runpy.py", line 193, in_run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\hoge\anaconda3\envs\painter\lib\runpy.py", line85, in_run_code
    exec(code, run_globals)
  File "C:\Users\hoge\anaconda3\envs\painter\Scripts\dream.exe\_main__.py", line 4, in <module>
  File "C:\Users\hoge\anaconda3\envs\painter\lib\site-packages\big_sleep\_init__.py", line 1, in <module>
    from big_sleep.big_sleep import BigSleep, Image
  File "C:\Users\hoge\anaconda3\envs\painter\lib\site-packages\big_sleep\big_sleep.py", line 26, in <module>
    assert torch.cuda.is_available(), 'CUDA must be available in order to use Big Sleep'
AssertionError: CUDA must be available in order to use Big Sleep

Reference Site:
TensorFlow to build Anaconda environment in Ubuntu ~CUDA, cuDNN installation ~
Install Big Sleep (CLIP+BigGAN) for AI image generation

When I searched the error message, there was information that told me to install pytorch, so I tried, but it didn't work.

$conda install pytorch torchvision torchaudio cudatoolkit=10.0-cpytorch-conda-forge
$ dream "apyramid made of ice"
Traceback (most recent call last):
  File "C:\Users\hoge\anaconda3\envs\painter\lib\runpy.py", line 193, in_run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\hoge\anaconda3\envs\painter\lib\runpy.py", line85, in_run_code
    exec(code, run_globals)
  File "C:\Users\hoge\anaconda3\envs\painter\Scripts\dream.exe\_main__.py", line 4, in <module>
  File "C:\Users\hoge\anaconda3\envs\painter\lib\site-packages\big_sleep\_init__.py", line 1, in <module>
    from big_sleep.big_sleep import BigSleep, Image
  File "C:\Users\hoge\anaconda3\envs\painter\lib\site-packages\big_sleep\big_sleep.py", line 26, in <module>
    assert torch.cuda.is_available(), 'CUDA must be available in order to use Big Sleep'
AssertionError: CUDA must be available in order to use Big Sleep

Other than that, I reinstalled Anaconda and tried again, and installed the driver from the NVIDIA site instead of via conda, but it didn't work.

python machine-learning windows-10 gpu cuda

2022-09-30 13:57

2 Answers

Can't you install -cpytorch from PyPI with -ctorch?


2022-09-30 13:57

I solved myself.
I started everything from scratch and it worked.


2022-09-30 13:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.