ariaaay / clip2brain

Code from paper "Natural language supervision with a large and diverse dataset builds better models of human high-level visual cortex"
MIT License
14 stars 6 forks source link

A suggestion for environment setup #5

Closed JustMuteAll closed 8 months ago

JustMuteAll commented 8 months ago

When I finished steps in tutorial, set up the conda environment and run the .sh file, errors were reported because versions of cuda and pytorch are not compatible.If you simply use "pip install -r requirements.txt"(By the way, there is a typo in the tutorial, the name of env setup file should be "requirements.txt" instead of "requirement.txt"), you won't be able to use gpu as the device for pytorch codes. I find a solution working on my device. When you are going to install requirements, first create a conda env and use the command from the official website of pytorch(https://pytorch.org/ ), for example, “conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia” Then use "pip install -r requirements,txt" to install other packages.

ariaaay commented 8 months ago

Thanks for pointing out the typo.

I don't use conda environment since it oftentimes confuses with pip. I agree that you should install Pytorch separately since every user has their own cuda and gpu setup. I will point that out in the README. Thank you!

ariaaay commented 8 months ago

closed