cnr-isti-vclab / TagLab

A CNN based image segmentation tool oriented to marine data analysis
https://taglab.isti.cnr.it/
GNU General Public License v3.0
84 stars 33 forks source link

install script on M1 Mac hangups #65

Closed kidconcept closed 2 years ago

kidconcept commented 2 years ago

Just got through the install script on an M1 Macbook and had to manually install a few of the items, as well as run in rosetta. The most glaring problem I ran into was line 232 of the install script...

# torch and torchvision subprocess.check_call([sys.executable, "-m", "pip", "install", torch_package, torchvision_package, 'torch_extra_argument1', 'torch_extra_argument2'])

I got an invalid argument '' error during the install. So I guess these variables aren't being assigned values for me. Since the M1 requires running the install in cpu mode I copy pasted the following parameters in place of the torch_extra_argument variables and finally got through this line.

"--extra-index-url", "https://download.pytorch.org/whl/cpu"

maxcorsini commented 2 years ago

Hi, In Mac you do not have CUDA available so the only option is to use the cpu. This requires to install the CPU version of pytorch with the command:

python.exe install.py cpu

Best

kidconcept commented 2 years ago

I was running the install as cpu, I think this issue should be reopened.

jebyrnes commented 1 year ago

Is there a way to use the GPUs on an M1 or M2, though?