Introducing the ChromeOS Crostini Machine Learning Setup Script
Over the past month, I have been researching Machine Learning and the insane amount of future possibilities that will result in the breakthroughs being made today. Projects like Keras and Tensorflow are pushing the boundaries on what computers are capable of and enabling just about anyone without a multi-million dollar server cluster to get into machine learning. I have built a simple setup script that will automate the process of setting up all of the tools needed to get started with Miniconda, TensorFlow, Keras, Pytorch, OpenCV and more in a ChromeOS Crostini Container. Here is how to get started:
Disclaimer: This Page Has Been Archived
Please note that this blog post has been archived and may contain information that is outdated, defunct, or covers topics that are no longer of interest. It is being kept available solely for reference purposes, in case others might find portions of it useful.
For more recent and up-to-date tutorials, I recommend visiting KMyers.me or other websites that specialize in the topic you are interested in. It is always advisable to seek the most current information to ensure accuracy and relevance.
These tools currently require you to have a fairly high en Chromebook with ~20 GB of free space to build. I have personally tested this on a Google i7/512 GB Pixelbook and the HP Chromebook X2 The tool does download a few large .tar.gz files which are deleted after extraction so it will only need part that space to do the initial setup. You will also need a X86_64 Chromebook (Intel or AMD) and you want to have one with a minimum of 8 GB of RAM - technically you could do it with less but performance may suffer.
Important Note : As Chromebooks do not have the optional hardware setup to do training on, it is best to stick with pre-trained models. I personally train my models on a beefy machine with a EVGA GeForce RTX 2070 GPU, 32 GB of DDR4 and a Ryzen 7 CPU. I am not saying it is impossible to train on a CPU but it wont be very efficient and will take exponentially longer than doing it on a GPU.
I have also added support for the Intel Movidius Neural Compute Stick and the Google Coral Edge TPU – You will need to have USB support for “unsupported devices” enabled in ChromeOS before you can use these external accelerators. The Movidius Neural Compute Stick has Intel´s VPU which allows you to offload several Computer Vision tasks over to it to take the load off of your CPU. The Google Coral Edge TPU allows you to run models optimized for Tensorflow Lite. The Google Coral Edge TPU support is currently experimental as I do not personally own one at this time so I have not been able to test.
Getting Started is easy, simply launch a new Crostini Linux Shell and run the following
cd ~/
sudo apt install -y wget && bash <(wget -qO- https://raw.githubusercontent.com/KeithIMyers/Crostini-Machine-Learning/master/CrostiniMLSetup);
I recommend choosing the default options which will setup Conda, Tensorflow, Keras, Pytorch, OpenCV and a Example Script. The installation may take several hours as it builds OpenCV from source. I recommend connecting your Chromebook to a power source and grabbing a coffee while the installation is in progress. No interaction is needed unless you choose to install support for the Google Coral Edge TPU.
On completion, your browser will automatically open to a dedicated Project Page which has some FAQs and tips to get started.
The source is GPLed so feel free to fork/use and modify the code as you see fit. The GitHub is at https://github.com/KeithIMyers/Crostini-Machine-Learning . Feel free to report issues on Github.