shimming-toolbox / shimming-toolbox

Code for performing static, dynamic and real-time shimming using external and internal MRI shim coils
https://shimming-toolbox.org/
GNU General Public License v3.0
26 stars 12 forks source link

Add macOS 11.0 on M1 installation instructions to documentation #187

Closed jidicula closed 1 year ago

jidicula commented 3 years ago

Checklist

Description of Problem / Inefficiency:

Our current documentation is fine for macOS on Intel chips, but with the new lineup of M1 Macs using the Apple Silicon architecture, each of the commands would have to be prefixed with arch -x86_64 to use the Rosetta 2 emulator[1].

Implementation Suggestion:

Add a section just for M1 Macs with each command (including prelude installation) prefixed with arch -x86_64.

Additional Context / Screenshots:

[1] https://news.ycombinator.com/item?id=25132679

jidicula commented 3 years ago

As a sidenote: if anyone on the team has bought one of the new Macs, it would be great if they could test the installation steps once we've written them up 😄

mathieuboudreau commented 3 years ago

Happy to test this if you give me some user scenarios to try and provide feedback on

jidicula commented 3 years ago

@mathieuboudreau could you start by trying to install it fresh into a new conda virtualenv (instructions here) following these directions and then running the full unit test suite?

mathieuboudreau commented 3 years ago

First note: Python 3.7 isn't available on conda channel for ARM. Anaconda/Miniconda isn't compatible with Mac M1 at the moment, Miniforge is needed, and so it's restricting which Python version I can get.

Here is the output:


Last login: Tue Feb  9 14:02:28 on ttys001
(base) dev@MacBook-Pro ~ % conda create -n shim_venv python=3.7
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - python=3.7

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
mathieuboudreau commented 3 years ago

Trying using Python 3.8 as an alternative.

Installation log

Numpy fails to install, due to a Fortran error.

Unsure why SCT didn't result in this error for numpy. You're forcing version 1.9.x vs SCT is downloading the latest version.

mathieuboudreau commented 3 years ago

Installing the latest Numpy in your venv doesn't work either, it throws an error.

Looking into the Conda venv generated by SCT, it's using Python 3.6.12 (!?!) and Numpy 1.19.5 (!?!?!). @jcohenadad are your dependencies in SCT conda venv precompiled/packaged? Is that why it's maybe working for that tool but I can't use them here when pulling them through Miniforge?

mathieuboudreau commented 3 years ago

I think the issue might be installing through pip like you are vs conda channels that have builds ready for arm.

I just tried using Python 3.8.5 conda venv and conda install numpy and it installed successfully.

mathieuboudreau commented 3 years ago

Note: none of the above were done using the arch -x86_64 command

jcohenadad commented 3 years ago

Thank you @mathieuboudreau for these investigations! cross-referencing https://github.com/neuropoly/spinalcordtoolbox/issues/3211 and tagging @joshuacwnewton @drulex @kousu @ahill187

are your dependencies in SCT conda venv precompiled/packaged? Is that why it's maybe working for that tool but I can't use them here when pulling them through Miniforge?

Our dependencies use pip, and I think they are precompiled (using wheels). But the rest of the team can correct me.

Possibly-related: https://github.com/neuropoly/spinalcordtoolbox/issues/2841

jidicula commented 3 years ago

Note: none of the above were done using the arch -x86_64 command

Thanks @mathieuboudreau! I was hoping to establish a baseline of what steps might fail, and you've given us a great picture of what our package experience currently looks like on the M1 Macs.

If it's not too much trouble, could you also try the same instructions above but prefixing commands with arch -x86_64 or running them in a Terminal that always runs through Rosetta?

mathieuboudreau commented 3 years ago

Minor update (positive news!)

I created a new user account on my MBP and ran all the instructions with the prefix arch -x86_64, here is my experience so far.

venv log installation log pytest log

Key things to note:

I'll now go through the process of installing both of those dependencies using arch -x86_64 and report back.

mathieuboudreau commented 3 years ago

Another minor update with more positive news.

I installed dcm2niix (built from source) and FSL using the prefix arch -x86_64. Note, FSL has a banner on their website stating incompatibility with M1 Macs, but I like to live life dangerously, so I tried it anyways.

dcm2niix build log FSL installation log re-running pytest log

Key things to note:

I checked and dcm2niix is in my path, so it may be that this tool isn't currently compatible with M1?

(shim_venv) dev-rosetta@MacBook-Pro shimming-toolbox % dcm2
dcm2bids           dcm2bids_helper    dcm2niibatch       
dcm2bids2          dcm2bids_scaffold  dcm2niix           

There isn't any issues open on the dcm2niix about this. Maybe I should not try to install from source and instead install from conda?

mathieuboudreau commented 3 years ago

I just tried installing dcm2niix using conda (with the arch -x86_64 prefix), and not only do the tests still fail, but now more tests fail.

log

mathieuboudreau commented 3 years ago

Funny thing, I just tried running dcm2niix on a sample dataset I found on google [here]((https://medistim.com/dicom/) (bmode), and it ran fine:

```shell (shim_venv) dev-rosetta@MacBook-Pro ~ % arch -x86_64 dcm2niix bmode.dcm Chris Rorden's dcm2niiX version v1.0.20181114 Clang4.0.1 (64-bit MacOS) Found 392 DICOM file(s) Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.PressAndHold/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.languageassetd/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.stocks.detailintents/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.System.set-account-picture/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.ScreenTimeAgent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.RAQLThumbnailExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.System.add-to-iphoto/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.mobiletimer-framework.MobileTimerIntents/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.weather.widget/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.preferences.sharing.SharingBluetoothService/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.MediaPlayer.DiagnosticExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Photos.PhotosFileProvider/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.osx-tailspin/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.quicklook.QuickLookUIService/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.mail.MailQuickLookExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.iCal.CalendarWidgetExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.contacts.donation-agent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.timemachine/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.photolibraryd/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.finder.RotateQuickAction/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.CryptoTokenKit.setoken/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.iBooksX.SharingExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.System.set-desktop-image/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.mediastream.mstreamd/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.news.tag/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.getmobilityinfo/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AMPDeviceDiscoveryAgent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.ClassKit.diagnosticextension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.finder.MarkupQuickAction/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.todoist.mac.Todoist.TodoistSafari/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.DiagnosticExtensions.WiFi/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.maillogs/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.CalendarNotification.CalNCService/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.SceneKitQLPreviewExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.finder.CreatePDFQuickAction/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AppSSOKerberos.KerberosExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Safari.CacheDeleteExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AddressBook.ContactsAccountsService/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.reminders.WidgetExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.icloud.SPOwner.SearchPartyDiagnosticExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.Kotoeri.RomajiTyping/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.TCIM/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.podcasts.PodcastsNotificationExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.reminders.macOSIntentsExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.Korean/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.preferencepane.security.AdvertisingExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.EmojiFunctionRowItem/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.news.widget/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.ScreenTimeWidgetApplication.ScreenTimeWidgetExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.WatchFaceAlert.ThumbnailExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.CloudSharing.invite/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.installlog/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.photoanalysisd/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.Mail.compose-back-to-sender/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.PhotoLibraryServices.PhotosDiagnostics/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Photos.PhotosReliveWidget/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.CoreRoutine.RTDiagnosticExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.notificationcenterui/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.SafariTechnologyPreview.CacheDeleteExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.das.DASDaemon.DuetDiagnosticExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.iCal.CalendarNotificationContentExtention-OSX/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.todoist.mac.Todoist.TodoistShare/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.ContactsAgent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Music.MusicCacheExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.news.widgetintents/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.podcasts.MacQuicklookExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.MarkupUI.Markup/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.syslog/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.MailCacheDelete/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.siri.parsec.HashtagImagesApp.HashtagImagesExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AuthKitUI.AKAppSSOExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.HindiIM/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.CryptoTokenKit.pivtoken/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.systemprofile/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Safari.DiagnosticExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.geod/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.TV.TVCacheExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.CalendarAgent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Safari.SafariQuickLookPreview/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.filevault/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.SafariTechnologyPreview.DiagnosticExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.AirDrop.send/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.preferencepane.security.PrivacyAnalytics/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.VietnameseIM/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.messages.ShareExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.DiagnosticExtensions.sysdiagnose/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.preferencepane.security.PrivacyTrackingAwareness.PrivacyPhotos/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AppleMediaServicesUI.SpyglassPurchases/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.SceneKitQLThumbnailExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AVConference.Diagnostic/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.ChineseHandwriting/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.routined/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.SCIM/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.stocks.widget/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.finder.TrimQuickAction/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.adobe.accmac.ACCFinderSync/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Notes.WidgetExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.mobiletimer.WorldClockWidget/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.UsageTrackingAgent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.news.articlenotificationextension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.Kotoeri.KanaTyping/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.spotlight/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.accessibility.mediaaccessibilityd/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.RAQLPreviewExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.amarcus.PiPer.PiPerExt/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.quicklook.ui.helper/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.iBooksX.CacheDelete/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.System.add-to-safari-reading-list/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.Mail.compose/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.diagnosticextensions.osx.wifi/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Notes.IntentsExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.MailShareExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.weather.WeatherIntents/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.AirPlayUIAgent/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.inputmethod.TYIM/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.preferences.sharing.SharingPrefsExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Notes.SharingExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.messages.ReplyExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.reminders.sharingextension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.DiagnosticExtensions.AirPlay/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.podcasts.widget/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.mail.MailNotificationContentExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.Notes.QuickLookExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.mediaanalysisd/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.OSDUIHelper/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.CalendarWidget.IntentsExtension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.reminders.quicklookextension/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Library/Containers/com.apple.share.CopyLink.invite/Data/Downloads/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/bmode.dcm Error: Compressed image stored as 38 fragments: decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k /Users/dev-rosetta/Downloads/bmode.dcm slices not stacked: echo varies (TE 14.5, 11.5; echo 5, 4). Use 'merge 2D slices' option to force stacking Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_7_e5_ph (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_6_e1 (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_6_e3 (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_6_e2 (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_6_e6 (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_7_e4_ph (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_6_e4 (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_6_e5 (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_7_e6_ph (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_7_e1_ph (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_7_e3_ph (128x76x10x1) Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_a_gre_DYNshim_20191101153345_7_e2_ph (128x76x10x1) Warning: Images sorted by instance number [0020,0013](137..432), but AcquisitionTime [0008,0032] suggests a different order (144120..144117) Warning: Weird CSA 'ProtocolSliceNumber' (System/Miscellaneous/ImageNumbering reversed): VALIDATE SLICETIMING AND BVECS Convert 32 DICOM as /Users/dev-rosetta/dev-rosetta_standard_20200221110129_106_e1 (64x64x2x16) Convert 20 DICOM as /Users/dev-rosetta/dev-rosetta_gre_realtime_zshim_UNSHIMMED_2_20200817104950_17_e3 (128x68x20x1) Convert 20 DICOM as /Users/dev-rosetta/dev-rosetta_gre_realtime_zshim_UNSHIMMED_2_20200817104950_17_e1 (128x68x20x1) Convert 20 DICOM as /Users/dev-rosetta/dev-rosetta_gre_realtime_zshim_UNSHIMMED_2_20200817104950_17_e2 (128x68x20x1) slices stacked despite varying acquisition numbers (if this is not desired recompile with 'mySegmentByAcq') Warning: all images appear to be a single slice - please check slice/vector orientation Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_gre_field_mapping_PMUlog_2_20200817104950_16_e2_ph (64x96x1x10) Warning: Check that 2D images are not mirrored. Warning: all images appear to be a single slice - please check slice/vector orientation Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_gre_field_mapping_PMUlog_2_20200817104950_15_e2 (64x96x1x10) Warning: Check that 2D images are not mirrored. Warning: all images appear to be a single slice - please check slice/vector orientation Convert 10 DICOM as /Users/dev-rosetta/dev-rosetta_gre_field_mapping_PMUlog_2_20200817104950_15_e1 (64x96x1x10) Warning: Check that 2D images are not mirrored. Convert 20 DICOM as /Users/dev-rosetta/dev-rosetta_ep2d_bold_realtime_zshim_UNSHIMMED_2_20200817104950_34_e1 (112x88x7x20) Conversion required 1.996310 seconds (0.956275 for core code). (shim_venv) dev-rosetta@MacBook-Pro ~ % ```

And the image looks fine on FSLeyes (!!! @jcohenadad, it works on M1! (at least through the full FSL installation + the arch -x86_64 prefix)):

Capture d’écran 2021-02-10 à 10 15 17

So maybe dcm2niix isn't the the sole reason for the test failures above on the M1?

mathieuboudreau commented 3 years ago

Also @jcohenadad as a sidenote, the very strange thing about FSLeyes working is that I didn't do any manual changes related to the OpenGL issue we previously encountered...? 🛸

jcohenadad commented 3 years ago

Thank you @mathieuboudreau . This is overall quite promising indeed, but I am worried how we will document the installation of Python, requirements and every 3rd party software. Anyways, your investigations are gold 🏅

mathieuboudreau commented 3 years ago

In this transition period that people with M1 macs are experiencing, maybe a video walkthrough of the installation experience would suffice for this edge case?

po09i commented 2 years ago

I got my hands on a M1 laptop and tested the installation of shimming toolbox.

Info

MacBook Pro (13-inch, M1, 2020) MacOS Monterey Version 12.0.1

Installing dependencies

FSL

I downloaded fsl using their latest available version: MacOS BigSur Version 10.16 Everything downloaded and installed fine. I'm able to run prelude and fsleyes.

SCT

I downloaded SCT and ran into an error while installing:

Check if Keras (2.3.1) is installed................../install_sct: line 748: 31052 Illegal instruction: 4  sct_check_dependencies`

There is already a PR in the work addressing this issue: https://github.com/spinalcordtoolbox/spinalcordtoolbox/pull/3569

Installing shimming toolbox

I followed the normal MacOS instructions using make install and was able to call the CLIs. I tested the installation by running pytest in the venv it created. The only tests that did not pass were the ones requiring SCT which obviously did not work since SCT was not able to be installed properly.

So this is great news! We don't seem to need separate instructions for shimming-toolbox.

jcohenadad commented 2 years ago

Thank you for reporting this @po09i , regarding the SCT installation error, can you please try installing the stable 5.4 release? tagging @joshuacwnewton

po09i commented 2 years ago

Thank you for reporting this @po09i , regarding the SCT installation error, can you please try installing the stable 5.4 release?

I installed v5.4 and everything is working fine.

Log v5.4 Spinal Cord Toolbox (git-HEAD-e70fecd994058a259d6770f527fa5352a0d38f3f) sct_check_dependencies -- SCT info: - version: git-HEAD-e70fecd994058a259d6770f527fa5352a0d38f3f - path: /Users/alex/Documents/School/Polytechnique/Master/project/spinalcordtoolbox OS: osx (Darwin-21.1.0-x86_64-i386-64bit) CPU cores: Available: 8, Used by ITK functions: 8 RAM: Total: 8192MB, Used: 779MB, Available: 471MB Check Python executable.............................[OK] Using bundled python 3.6.13 |Anaconda, Inc.| (default, Feb 23 2021, 12:58:59) [GCC Clang 10.0.0 ] at /Users/alex/Documents/School/Polytechnique/Master/project/spinalcordtoolbox/python/envs/venv_sct/bin/python Check if data are installed.........................[OK] Check if colored is installed.......................[OK] (1.4.2) Check if dipy is installed..........................[OK] (1.4.1) Check if futures is installed.......................[OK] Check if h5py is installed..........................[OK] (2.10.0) Check if Keras (2.1.5) is installed.................[OK] (2.1.5) Check if ivadomed is installed......................[OK] (2.8.0) Check if matplotlib is installed....................[OK] (3.3.4) Check if nibabel is installed.......................[OK] (3.2.1) Check if numpy is installed.........................[OK] (1.19.5) Check if onnxruntime (1.4.0) is installed...........[OK] (1.4.0) Check if pandas is installed........................[OK] (1.1.5) Check if psutil is installed........................[OK] (5.8.0) Check if pyqt5 (5.11.3) is installed................[OK] (5.11.3) Check if pytest is installed........................[OK] (6.2.5) Check if pytest-cov is installed....................[OK] (2.12.1) Check if raven is installed.........................[OK] Check if requests is installed......................[OK] (2.26.0) Check if requirements-parser is installed...........[OK] (0.2.0) Check if scipy is installed.........................[OK] (1.5.4) Check if scikit-image is installed..................[OK] (0.17.2) Check if scikit-learn is installed..................[OK] (0.24.2) Check if tensorflow (1.5.0) is installed............[OK] (1.5.0) Check if torch (1.5.0) is installed.................[OK] (1.5.0) Check if torchvision (0.6.0) is installed...........[OK] (0.6.0) Check if xlwt is installed..........................[OK] (1.3.0) Check if tqdm is installed..........................[OK] (4.62.3) Check if transforms3d is installed..................[OK] (0.3.1) Check if urllib3 is installed.......................[OK] (1.26.7) Check if pytest_console_scripts is installed........[OK] Check if wquantiles is installed....................[OK] (0.4) Check if spinalcordtoolbox is installed.............[OK] Check ANTs compatibility with OS ...................[OK] Check PropSeg compatibility with OS ................[OK] Check if figure can be opened with matplotlib.......[OK] (Using GUI backend: 'MacOSX') Check if figure can be opened with PyQt.............[OK] Check FSLeyes version...............................[OK] (1.3.0) Open a new Terminal window to load environment variables, or run: source /Users/alex/.zshrc Installation finished successfully!

Shimming toolbox st_check_dependencies also works fine now that SCT is installed properly.