![]() ![]() If you're using an M1 variant Mac, it's " Miniforge3-MacOSX-arm64" <- click for direct download.Ĭlicking the link above will download a shell file called Miniforge3-MacOSX-arm64.sh to your Downloads folder (unless otherwise specified). Download the most compatible version of Miniforge (minimal installer for Conda specific to conda-forge, Conda is another package manager and conda-forge is a Conda channel) from GitHub. It will explain what it's doing and what you need to do as you go.Ģ. The command to install Homebrew will look something like: Homebrew is a package manager that sets up a lot of useful things on your machine, including Command Line Tools for Xcode, you'll need this to run things like git. Installing package managers (Homebrew and Miniforge) Think of it like this: a package manager is a piece of software that helps you install other pieces (packages) of software. Note: You're going to see the term "package manager" a lot below. If you're new to creating environments, using a new M1, M1 Pro, M1 Max, M1 Ultra, M2 machine and would like to get started running TensorFlow and other data science libraries, follow the below steps. How to setup a TensorFlow environment on Apple Silicon using Miniforge (longer version) PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] [PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'), If it all worked, you should see something like: TensorFlow has access to the following devices: Print(f"TensorFlow has access to the following devices:\n") Import dependencies and check TensorFlow version/GPU access. conda install jupyter pandas numpy matplotlib scikit-learnġ2. python -m pip install tensorflow-datasetsġ1. (Optional) Install TensorFlow Datasets to run benchmarks included in this repo. python -m pip install tensorflow-metalġ0. Install Apple's tensorflow-metal to leverage Apple Metal (Apple's GPU framework) for M1, M1 Pro, M1 Max, M1 Ultra, M2 GPU acceleration. Install base TensorFlow (Apple's fork of TensorFlow is called tensorflow-macos). Install TensorFlow dependencies from Apple Conda channel. Make and activate Conda environment with Python 3.8 (Python 3.8 is the most stable with M1/TensorFlow in my experience, though you could try with Python 3.x). Create a directory to setup TensorFlow environment. Sh ~/Downloads/Miniforge3-MacOSX-arm64.shĥ. chmod x ~/Downloads/Miniforge3-MacOSX-arm64.sh Note: If you already have a version of Anaconda installed, it may cause conflicts when installing Miniforge (if you're using M1/Pro/Max/Ultra/M2, favour Miniforge because it's specifically designed for arm64 chips). Install Miniforge3 into home directory.Download Miniforge3 (Conda installer) for macOS arm64 chips (M1, M1 Pro, M1 Max, M1 Ultra, M2).Follow the steps it prompts you to go through after installation. If you're experienced with making environments and using the command line, follow this version. How to setup a TensorFlow environment on Apple Silicon using Miniforge (shorter version) The code from the video is from my M1 machine learning speed test GitHub repo. You can find a step by step video version of this article on YouTube. If you have issues, please post them on the GitHub Issues page so others can see. If you're experienced at setting up environments, the shorter text-based instructions should be enough. If you're new to setting up environments and software packages, watch the video version alongside the longer text-based instructions below. This post: teaches you how to install the most common machine learning and data science packages (TensorFlow, pandas, NumPy, Jupyter, matplotlib, scikit-learn) on your machine and make sure they run using sample code. You: have a new M1, M1 Pro, M1 Max, M1 Ultra or M2 Mac and would like to get started doing machine learning and data science on it. Let's get your Apple Silicon Mac (M1, M1 Pro, M1 Max, M1 Ultra or M2) setup for machine learning and data science. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |