Add support for Apple Silicon [Work In Progress] #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @ageron,
I've recently got a machine with Apple Silicon and I tried running the notebooks on it natively. Given the official support, it only required to install
Miniforge
instead ofMiniconda
and make a few changes to the environment file:Also, to install
transformers
for Chapter 16 it requires to build one of its dependenciestokenizers
, sorust
should be also installed. According to the open issue intokenizers
, they will provide binary wheels as soon as Apple Silicon VMs are available on GitHub, so therust
dependency might be gone soon.As for Chapter 19,
tensorflow-serving-api
has to be installed without dependencies (otherwise it uninstallstensorflow-macos
and can not proceed with installingtensorflow
). Also, arm64-based docker image should be used (the source code is available here). I expect there will be a few changes to other notebooks, but the notebooks for the first 11 chapters run without any issues.In this draft PR, I added the instructions to
INSTALL.md
on how to set up the environment, updated Chapter 19 notebook, and createdenvironment-apple-silicon.yml
.What do you think about having several
.yml
files for conda environments?environment.yml
- for the base case,environment-apple-silicon.yml
- specifically for Apple Silicon,environment-gpu.yml
(or even betterenvironment-nvidia-gpu.yml
) for NVidia GPUs with Compute Capability, which should work well both on Linux and Windows, as I explained here.Only I'm not sure if the last two files should be stored in the root of the repository or in a separate directory, such as
extra-conda-envs
?