-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tensorflow not supported on Apple M1 chips #98
Comments
I discussed this with @lassedochreden. Not a huge issue since we can always use ubuntu systems - just so that you know that there are tensorflow/mac issues. |
Thanks for reporting this - tensorflow by now should support M1, but it may be that deepcell still uses an old version. I'll check and report back here. |
I was wrong, tensorflow within linux Docker on M1 doesn't seem to work at the moment, sorry. |
Dear all, After many trials and errors, I am now able to run Steinbock and other tools that you made available on this website almost without errors. This is really awesome, thanks a lot! I am currently using iMac with Intel chip but not without performance issues. So since M1/M2 chips are almost the only available options now, I am wondering whether previous issues mentioned here with Docker/ Steinbock and tensor flow vs Apple chips are still a problem at the moment? Thank you! |
Hi @caucheteux, thanks for pinging us here about this! We are currently testing a few routes how to make this work (emulating the amd64 platform on M1, providing containers specifically built for M1, ...), but haven't yet settled on a solution. I'll reopen this issue to keep track of our efforts here. One thing you can try already, is to execute |
Quick update: using |
Thanks a lot for the update, I appreciate it. I'll give it a go with amd64 and will let you know asap. |
Right, I guess that makes sense. Is it easier to recompile an amd64-without-AVX version of tensorflow than to make it work on M1? And just how much performance does that give up real hardware, anyway? |
prepare macos/arm64 Docker image (prepares #98) add xpra-enabled Docker image add view command (closes #27) add apps jupyterlab command upgrade workflows fix pyproject.toml setuptools devel extra minor code improvements run_captured now captures stderr only call fixuid when $RUN_FIXUID is set (closes #156) fix missing error message for non-existing related files (closes #151) update test skeletons (prepares #95) update mkdocs setup rename framework to toolkit update installation instructions (closes #160)
Quick update: It has been confirmed that an amd64-without-AVX build such as this one works indeed, albeit very slow (HT to Will Chen from UCSF). The preferred solution would still be to build tensorflow for linux/arm64... |
Hi @jwindhager , I'm using the most current version of the Steinbock pipeline (0.16.0) and have gotten some of it to work with my M1 Mac. As others have described, I'm running into issues with the deepcell/mesmer segmentation that uses tensorflow. I've tried the -macos.whl and -linux_x86_64.whl but still haven't gotten the docker segmentation to work. It seems that tensor flow installs correctly when trying the macos and linux_x86_64 wheels, but the Steinbock docker image has arguments that use the AVX version of tensorflow? I saw this file that you uploaded recently with details on using tensor flow with M1 Mac's. How would I modify the docker image with the correct tensorflow arguments? When I open the docker desktop and 'View packages and CVEs' for the Steinbeck image, I can I see tensorflow arguments are listed on layers: 10: 12: 15: (layer numbers on my device when inspecting the image's 59 layers in the docker dashboard). Trying to modify the container by image by using I appreciate your time and help! EDIT 03/08/23 I've figured out how to download and (attempt) to modify the Steinbock docker image, but still haven't had success. Here are my steps trying to troubleshoot the issue:
When inspecting the contents of the extracted tar, it seems that I should be able to modify the a0f2496869280e5b545fc32b44121bd4eaf4137d39b91d23151d64f2244ace65.json which contains the configuration for the image. There are arguments in this .json that specify which version of tensorflow to install: |
Hi @jul1an-o, sorry for the delay. Just briefly writing to let you know that I'm currently traveling and will respond in 2 weeks the latest. Meanwhile, maybe the current steinbock maintainer (@Milad4849) can help out. |
Hi @jwindhager, just wanted to follow up on this and see if you were in the process of working on a solution? |
Hey @jul1an-o, apologies for the late reply! Unfortunately, the current steinbock Having said that, people have reportedly had success with non-AVX community builds of TensorFlow, such as the one mentioned in the code comment above. If you want to give this a try, you would need to manually modify the As to your question on where we stand with adding out-of-the-box support for Apple's ARM platform: unfortunately, as long as Google does not provide a TensorFlow Docker image for that platform or mac/arm64 wheels of the TensorFlow package, this will likely not be added anytime soon, sorry (please correct me if I'm wrong @Milad4849). |
Thanks guys. All this info is very helpful indeed. I also havent been able to run it on M1. But as @jwindhager said well, you can run everything else but the deepcell regardless. I've been running the deep cell/ Mesmer masks separately still allowing me to use Steinbock and IMCSegPipe data for the IMCRtools or IMCDataAnalysis R packages. |
Has this been resolved? Can Deepcell/Mesmer based pipeline be compatible with mac. Is there a new version out soon that support Apple M chip series? Thanks for sharing your pipeline, works great on Intel/CUDA. |
Hi @jwindhager
I tested the DeepCell implementation in steinbock on my Mac (OS Big Sur 11.6.2, Apple M1 chip). As reported here, tensorflow within docker is not supported on this system and I get the following error:
I used this alias:
docker run --platform linux/amd64 -v /Users/lasmey/Desktop/IMC\ processing/steinbock_IMMUCAN:/data -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.Xauthority:/home/steinbock/.Xauthority:ro -u $(id -u):$(id -g) -e DISPLAY=$(hostname):0 ghcr.io/bodenmillergroup/steinbock:0.12.0
The text was updated successfully, but these errors were encountered: