Giter Club home page Giter Club logo

machine-learning-on-macbook-pro-m1's Introduction

Machine Learning on Apple MacBook Pro M1

A repository for running machine learning models on Apple MacBook Pro M1.

TensorFlow with tensorflow-metal PluggableDevice

With the tensorflow-metal PluggableDevice provided by Apple for TensorFlow, TensorFlow is able to be accelerated with Metal on Apple silicon Mac GPUs.

PyTorch

At the time of this writing, PyTorch is not yet able to be accelerated using Apple silicon Mac GPUs.

See pytorch/pytorch#47702 for current status.

Notebooks

In this repository you will find some notebooks for TF and PyTorch.

.
├── pytorch_notebooks
└── tensorflow_notebooks

After you've completed the setup below, you will be able to run these notebooks on your MacBook Pro M1.

Setup

brew install miniforge

conda create -n conda-ml-py39 python=3.9
conda activate conda-ml-py39

# https://developer.apple.com/metal/tensorflow-plugin/
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal

# https://stackoverflow.com/a/53546634
conda install ipykernel
ipython kernel install --user --name=setterpels39
mkdir -p ~/ml-py39
cd ~/ml-py39/

git clone https://github.com/openai/CLIP
git clone https://github.com/dribnet/clipit
git clone https://github.com/CompVis/taming-transformers.git
conda install numpy~=1.19.2
conda install -c pytorch pytorch==1.9.0 torchvision==0.10.0
conda install braceexpand omegaconf torch-optimizer \
              tqdm ftfy regex kornia pytorch-lightning \
              einops scikit-image cssutils wrapt opt_einsum \
              gast astunparse termcolor pandas ipywidgets \
              jupyterlab
pip install git+https://github.com/pvigier/perlin-numpy
pip install torch-tools
mkdir -p ~/src/github.com/BachiLi
cd ~/src/github.com/BachiLi/

git clone https://github.com/BachiLi/diffvg
cd diffvg

git submodule update --init --recursive

DIFFVG_CUDA=0 python setup.py install

Running

conda activate conda-ml-py39
cd ~/ml-py39/ && jupyter lab

machine-learning-on-macbook-pro-m1's People

Contributors

ctsrc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.