- The fastai forums
- Notebook on how to use Google Colab Setup for fastai
This is by far the easiest route. For each lesson, just open the notebook at select File > Save copy in Drive ...
Note, you may have to use Google Chrome. Google Colab did not work in Safari for me.
- Lesson 1: lesson1.ipynb
- Lesson 2: lesson1.ipynb, lesson1_breeds.ipynb
- Lesson 3: tmp_lesson1-quick.ipynb, keras_lesson1.ipynb, conv-example.xlsx, entropy_example.xlsx, lesson2-image_models.ipynb, lesson3-rossman.ipynb
- Lesson 4:
- Lesson 5:
- Lesson 6:
- Lesson 7:
Then run the "setup" cells that I have added to the beginning of each notebook. Thats it! To use a GPU, go to Edit > Notebook settings > Hardware accelerator > GPU
.
Arguably the easist way to manage your python / deep learning stack is to use conda, specifically, miniconda. Installation instructions can be found here, but essentially:
# download the installer
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh --output ~/miniconda.sh
# run it
bash ~/miniconda.sh
Follow the instructions here to setup an enviornment for following along with the fastai course (either GPU or CPU). Essentially:
# make sure conda and pip are up-to-date
conda update conda
# create a virtual enviornment with everything we need for running the lessons
git clone https://github.com/fastai/fastai.git
cd fastai
conda env create -f environment.yml
# activate that enviornment
conda activate fastai
There are some additional steps not present in the instructions above. You need to install nb_conda
, which allows you to use your virtual environment from within a notebook:
conda install nb_conda
and you need to downgrade one of the pytorch packages (this is likely temporary!)
pip install torchtext==0.2.3
To use the notebook, you have to activate your enviornment:
source activate fastai
move into the fastai repo
cd path/to/fastai
and launch jupyter notebook
jupyter notebook
Make sure that you select the right kernel! (Kernel > Change kernel > Python [conda:fastai]
)
Following the instructions here for a secure setup.
For a less secure setup,
- On the host machine:
source activate fastai
cd path/to/fastai
jupyter notebook
- On the local machine:
8888:localhost:8888 <username>@<host>
the notebook should be accesible in your browser at localhost:8888
.