albertyw/albertyw.com

View on GitHub
app/notes/20210201-0159.md

Summary

Maintainability
Test Coverage
Setting Up FastAI Fastbook on a Fresh Ubuntu Instance

fastbook-setup

1612144747

This is how to set up the fastai environment on a fresh Ubuntu instance, for
those of us who have a computer with a good Nvidia graphics card and Ubuntu
and don't want to use a cloud-based platform.

1.  Install nvidia CUDA drivers.  So far, the most dependable guide that I've found has been this [askubuntu post](https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu).
2.  Verify that the CUDA drivers have been installed correctly following [this guide](https://xcat-docs.readthedocs.io/en/stable/advanced/gpu/nvidia/verify_cuda_install.html).
3.  Download [fastbook](https://github.com/fastai/fastbook) with `git clone git@github.com:fastai/fastbook.git && cd fastbook`.
4.  Install the latest version of python - `sudo apt update && sudo apt install python3.9 python3.9-venv python3-setuptools`
5.  Create a virtual environment: `python3.9 -m venv env`
6.  Activate the virtual environment: `source env/bin/activate`
7.  Install a build requisite: `pip install wheel`
8.  Install packages: `pip install -r requirements.txt`
9.  Launch the notebook with `jupyter notebook`