For those of you wanting to run the v3 course notebooks on your own DL rig, here are the steps I followed to get things working …
I LOVE tmux and tmuxp and highly recommend both as a mean to get you up and running quickly.
- Clone the course repo:
mkdir -p ~/development/_training/ml/fastai-courses cd ~/development/_training/ml/fastai-courses git clone https://github.com/fastai/course-v3.git
- Create a conda environment:
conda create --name fastai-course-v3 python=3.7
- Create a tmuxp .yml file to configure your environment (see here for more on tmuxp)
touch ~/.tmuxp/fastai-course-v3.yml vim ~/.tmuxp/fastai-course-v3.yml
session_name: fastai-course-v3 windows: - window_name: dev window layout: main-vertical options: main-pane-width: 140 shell_command_before: # run as a first command in all panes - cd ~/development/_training/ml/fastai-courses/course-v3 - source activate fastai-course-v3 panes: - shell_command: - clear - shell_command: - clear - jupyter notebook - shell_command: - watch -n 0.5 nvidia-smi
- Load the tmux environment you just defined:
tmuxp load fastai-course-v3
Here is what my screen looks like …
- With your
fastai-course-v3environment activate, install the bit you’ll need as descibed on the fastai readme:
conda install -c pytorch pytorch-nightly cuda92 conda install -c fastai torchvision-nightly conda install -c fastai fastai # you may want to include the jupyter extensions to get things like code folding conda install -c conda-forge jupyter_contrib_nbextensions
At this point you should be able to run your jupyter notebook by going to
localhost:8888 or whatever port you have it running on.
If you get any errors when running jupyter, you may need to update your
~/.jupyter/jupyter_notebook_config.py, changing …
c.NotebookApp.ip = '*'
c.NotebookApp.ip = '0.0.0.0'
KEEPING THINGS UPDATED STEPS:
Run the following every time before you start working with the course material. They ensure you got the latest course code, latest production build of fastai, and that latest pytorch 1.0 builds:
cd ~/development/_training/ml/fastai-courses/course-v3 git pull conda update -c pytorch pytorch-nightly cuda92 conda update -c fastai torchvision-nightly conda update -c fastai fastai
This thread has a bunch of helpful information as well.