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:
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.
Thanks for this script. Bought last week Asus C434 and I have ML/DL as a hobby. This worked to crostini with latest stable chromeos. I chose only steps 1 and 5.
I have weird problem with crostini terminal sessions. For some reason scripts which are contacting some http(s) sites for package lists etc cannot be found. I got timeout. This problem is with my home-VSDL connection (used as a poweruser for years, no problems before), but when I share network connection from my iPhone crosini works without problems with those problematic sites. Has anyone seen this kind of thing. I got errors at least with conda update and apt-get updates. This your scirpt also did not work with my normal wifi-connection (made with VSDL to internet), but worked in first try with iPhone network share.
If I had to guess, your ISP may be doing something to limit the use of NATted IP addresses, you may be able to get around this by using a VPN on your Chromebook which should fix it.