![]() ![]() 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 Apple Silicon Mac (any of the M1 or M2 variants) and would like to get started doing machine learning and data science on it. Let's get your Apple Silicon Mac (any M1 or M2 variant) setup for machine learning and data science. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |