How to configure local computer for FastAI course

I wanted to check out the Practical Deep Learning for Coders course by FastAI. However, I noticed that the course provided configuration instructions mainly for cloud GPU instance providers like Paperspace. I have a notebook and a desktop computer with powerful NVIDIA GPUs and wanted to try the course on my local machines. The course material is also provided in the form of Jupyter notebooks, while I intended to turn those into Python programs to run locally.

Here are the steps I followed to get my local computer setup for the FastAI course:

  • The local computer was running Ubuntu 16.04 and NVIDIA drivers were already installed on it and working.
  • CUDA 9.0 was installed using the online instructions from NVIDIA.
  • The latest release of CuDNN was installed as described here.
  • Conda was installed and configured as described here. You should be able to run conda info from the shell. I wanted to try the course without resorting to Anaconda, but that seems unnecessarily complicated.
  • Clone the fastai Github repo:
$ git clone
  • In the fastai directory, use this command to create a Conda environment named fastai and install all the required Python packages (including PyTorch) under that:
$ conda env update
  • Activate the fastai environment:
$ conda activate fastai
  • Add the path to fastai to your PYTHONPATH environment variable, so that you can import it from Python.

  • Open a Python interpreter and check if you can import PyTorch and it has CUDA and CuDNN support:

$ python
>>> import torch
>>> torch.cuda.is_available()
>>> torch.backends.cudnn.enabled
  • Open a Python interpreter and check if you can import the fastai package:
$ from fastai.imports import *

You are now ready to execute any of the code shown in the course at a Python interpreter or inside Python scripts. Note that you will still need to download any additional datasets needed by the course. You will find these instructions in the Jupyter notebooks or course material.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.