Fast.ai environment setup with local GPU - Ubuntu 20.04
I’ve a laptop with Intel Core i9, 8 GB RAM (to be upgraded to 16GB after the crisis), Nvidia 1650 with 4GB vRAM. Though there are multiple cloud options, running your notebooks locally feels great, at least for me. So I setup dual boot with Ubuntu 20.04 on my laptop. I ran the first 3 notebooks without any issues (except for the first lesson, the pet dataset takes longer than a while to download). All the information you’re seeing below is already present on the forums and FastAI Github page and course page. I had to do this twice since I messed up my OS setup and I had to search in the forums again to complete this. So I thought of putting up a note for myself and share it with you people. Thanks to @FourMoBro and all my other classmates who pitched in the forums.
Github Links
- fastiai2 - https://github.com/fastai/fastai2
- coursev4 - https://github.com/fastai/course-v4
- fastbook - https://github.com/fastai/fastbook
- The Part 1 - 2020 course is running on fastai v2, which isn’t generally available yet. So, we need to install it from the github source (since under active development)
git clone https://github.com/fastai/fastai2
cd fastai2
conda env create -f environment.yml
source activate fastai2
- Once done, cd into the cloned directory and install from the latest code
git clone https://github.com/fastai/fastai2
cd fastai2
pip install -e ".[dev]"
I made a silly mistake in forgetting to install after creating the environment above. So, when I tried running the course notebooks,it was not able to find the fasti2 library
- To use fastai2.medical.imaging you’ll also need to:
conda install pyarrow
pip install pydicom kornia opencv-python scikit-image
-
fastai2 installation is now done.
-
For the course/fastbook notebooks to run, there are some extra dependenices that you might want to install
pip install graphviz
pip install azure-cognitiveservices-vision-computervision
pip install azure-cognitiveservices-search-websearch
pip install azure-cognitiveservices-search-imagesearch
pip install "ipywidgets>=7.5.1"
pip install sentencepiece
pip install scikit_learn
- Once the installation is done, you can cd into the coursev4 or fastbook and start running the notebooks.
Link to Google Docs version of the same
I’ll try and update the notes with how I installed the Nvidia GPU driver as well.