Replies: 10 comments 13 replies
-
Hi
Very good question. I would think that it is impractical to analyse Visium
data on most M1 laptops (unless you have more than 16GB RAM) - but maybe
1-2 sections can be analysed. I would say that you have to wait until we
delete pymc3 and theano from cell2location repo (it is currently needed
exclusively for cell2location-WTA model for Nanostring data). Pytorch seems
to work on M1 Mac.
…On Sun, 20 Mar 2022, 17:52 Iliya Lefterov, ***@***.***> wrote:
Has anyone been able to install and run cell2locations tutorials on Apple
laptops with an M1 chip? it seems that the conflict with jaxlib built using
AVX instructions remains unresolved... it is a problem no matter the
version of python, Theano, or pymc3.
Any idea how to work around it, or do we have to wait until all kinds of
M1-related issues are solved...?
—
Reply to this email directly, view it on GitHub
<#133>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMFTVZNU7RJ6UQLUXAFVRLVA5QVTANCNFSM5RFZ5CRQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
this is the type of M1s my postdocs work on... 🙂
from time to time I have to jump in and provide some help...
yes, it is possible to install pytorch and it should work on M1 (I believe)...
https://towardsdatascience.com/yes-you-can-run-pytorch-natively-on-m1-macbooks-and-heres-how-35d2eaa07a83
[https://miro.medium.com/max/1200/1*hsIzbaZLW6bsrwhvYkYWzQ.jpeg]<https://towardsdatascience.com/yes-you-can-run-pytorch-natively-on-m1-macbooks-and-heres-how-35d2eaa07a83>
Yes, You Can Run PyTorch Natively on M1 MacBooks, and Here’s How | by Dario Radečić | Towards Data Science<https://towardsdatascience.com/yes-you-can-run-pytorch-natively-on-m1-macbooks-and-heres-how-35d2eaa07a83>
M1 Macbooks aren’t that new anymore. Somehow, installing Python’s deep learning libraries still isn’t a straightforward process. At least with TensorFlow. PyTorch is different. Today you’ll learn how…
towardsdatascience.com
on the more practical side, (following one of your suggestions in Discussions), on 16" M1 Max, I got to the point when "import cell2location" is possible (for me) on the command line of python 3.9.10 but only if the installation is within a python virtual env. the same strategy works much faster and elegantly on a CentOs 8 Stream installed on a Dell with Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz/8 core; python there is 3.10.2 (I noticed that Theano and pymc3 are no longer problems with 3.10) However:
* on the M1 the interpreter does not pick up mkl and mkl-service even though they are there; removing and reinstalling the packages with conda or pip does not help; people say that the waning, and that is just a warning, can be ignored;
*
* on CentOS, the problem is similar, although a little different: Spyder displays a warning, that Rtree is missing, even though it is there; again it is just a warning. I have problems running the latest version of PyCharm but it is possible to hit the same problem there as well...
*
* I don't know what will happen if I try Jupyter...
*
* there is no problem installing anndata on M1.
So..., we don't give up... even though the graduate students are moving faster analyzing our spatial transcriptomic datasets with Seurat... 🙁
thanks, again! and will keep you posted.
will appreciate it if you don't post this in the Discussions
Best,
…-I.
--
Iliya Lefterov, MD, PhD
Professor, University of Pittsburgh
***@***.***
***@***.***
412 383 6906 <http://voice.google.com/calls?a=nc,%2B14123836906> - office
412 576 9923 <http://voice.google.com/calls?a=nc,%2B14125769923> - mobile
412 449 9195 <http://voice.google.com/calls?a=nc,%2B14124499195> - mobile
________________________________
From: Vitalii Kleshchevnikov ***@***.***>
Sent: Wednesday, March 23, 2022 7:20 PM
To: BayraktarLab/cell2location ***@***.***>
Cc: Lefterov, Iliya ***@***.***>; Author ***@***.***>
Subject: Re: [BayraktarLab/cell2location] run cell2location on M1 silicon chip BookPro (Discussion #133)
Re M1: Nice Mac you have :) You can create a branch of cell2location and delete all pymc3 code yourself as well.
Do you know if pytorch already supports the use of M1 GPU (not just CPU as it did initially)?
Re installing on macs - I have the same issues, also issues with installing anndata on Mac. The following works for me:
export PYTHONNOUSERSITE="aaaaa"
conda create -y -n test_c2l python=3.8
conda activate test_c2l
pip install pyro-ppl
conda install -y -c anaconda hdf5 pytables netcdf4
pip install git+https://github.com/BayraktarLab/cell2location.git#egg=cell2location[tutorials]
conda activate test_c2l
python -m ipykernel install --user --name=test_c2l --display-name='Environment (test_c2l)'
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBayraktarLab%2Fcell2location%2Fdiscussions%2F133%23discussioncomment-2426344&data=04%7C01%7Ciliyal%40pitt.edu%7C68f7e7df1adb4d88afef08da0d23c128%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637836744461128839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0I1dz8PU%2FPK6DBW9VKHhURiYojdzQvsv2Uib2eB6kEk%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAANSETW4UKPDKSMNM7CBDKLVBORMXANCNFSM5RFZ5CRQ&data=04%7C01%7Ciliyal%40pitt.edu%7C68f7e7df1adb4d88afef08da0d23c128%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637836744461128839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=EHKkqTbFYSdDwMBTooVc9JBEZEZ5XuhR7Looq2hexr4%3D&reserved=0>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
cell2location depends on scvi-tools, which is causing the jax dependency. Indeed jax/jaxlib can be installed on M1 natively using As an alternative you can install miniconda that is built for m1 macs, and then conda install scvi-tools, then pip install cell2location |
Beta Was this translation helpful? Give feedback.
-
We are on the way to try something similar (more powerful GPU, though), but isn’t it a nice and a very friendly Preamble to a fashionable readthedocs user guide, where you write (humbly, but strongly), that at the time the document has been posted, the only! or the following hardware platform(s) have been tested with such and such software packages…
Believe me – we will be extremely grateful to you!
Nice weekend
…-I.
--
Iliya Lefterov
Professor, School of Public Health
University of Pittsburgh
+1 412 449 9195 (mobile, USA)
***@***.***
From: Vitalii Kleshchevnikov ***@***.***>
Date: Friday, April 1, 2022 at 8:21 PM
To: BayraktarLab/cell2location ***@***.***>
Cc: Lefterov, Iliya ***@***.***>, Author ***@***.***>
Subject: Re: [BayraktarLab/cell2location] run cell2location on M1 silicon chip BookPro (Discussion #133)
I see. I have not actually run the workflow on my laptop - I only used the created environments for code development in pycharm.
I guess I would prefer to have a combination of simpler M1 laptops with A100 80GB GPU server to having only the best M1 laptops :)
—
Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FBayraktarLab%2Fcell2location%2Fdiscussions%2F133%23discussioncomment-2489196&data=04%7C01%7Ciliyal%40pitt.edu%7Cafbc3249efd84cebf94f08da143e8b08%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637844557009334644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Zl3L%2F55HfXknjjyioWsjK%2BRqL4l38qi8MZgTN1AfKzk%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAANSETUZ4LXCVEIEHTBZEZ3VC6HDPANCNFSM5RFZ5CRQ&data=04%7C01%7Ciliyal%40pitt.edu%7Cafbc3249efd84cebf94f08da143e8b08%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637844557009490883%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3JFK%2F4kCbNeCG%2B41nx3Ct3BRNI2pRGFoRxlWHHIPhXU%3D&reserved=0>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello, I was able to install the latest pytorch v1.12 which provides GPU support on m1 but cell2location is still painfully slow. I guess it is still not optimized. Is there a way to do this or will there be an official update?
Cheers |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
When PyTorch 2 will be out are you update cell2location ? What do you think of switching to tenserflow that’s already support apple silicon ?Le 26 janv. 2023 à 19:18, Adam Gayoso ***@***.***> a écrit :
I would expect it to work with pytorch 2.0, as not all operations have been implemented to work on MPS
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I believe I was having very similar issues, trying to run scvi-tools on my Apple laptop. Have you tried using mambaforge to install the packages? https://github.com/conda-forge/miniforge#mambaforge |
Beta Was this translation helpful? Give feedback.
-
Pip3 Le 28 janv. 2023 à 17:41, abidrehman2000 ***@***.***> a écrit :
I believe I was having very similar issues, trying to run scvi-tools on my Apple laptop. Have you tried using mambaforge to install the packages? https://github.com/conda-forge/miniforge#mambaforge
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Has anyone been able to install and run cell2locations tutorials on Apple laptops with an M1 chip? it seems that the conflict with jaxlib built using AVX instructions remains unresolved... it is a problem no matter the version of python, Theano, or pymc3.
Any idea how to work around it, or do we have to wait until all kinds of M1-related issues are solved...?
Beta Was this translation helpful? Give feedback.
All reactions