Skip to content

Instantly share code, notes, and snippets.

@cbjuan
Forked from tcvieira/setupFastaiV1.md
Last active December 12, 2018 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbjuan/26ed1bc0886ecf80d7c3390f24ea6af4 to your computer and use it in GitHub Desktop.
Save cbjuan/26ed1bc0886ecf80d7c3390f24ea6af4 to your computer and use it in GitHub Desktop.
Setup Fast.ai v1 on Paperspace Fast.ai Template

Setup Fastai v1 on Paperspace

Machine

  • Create a Fast.ai machine from public templates w/ P4000 and public IP
  • If you are not approved for using the P4000, request it. It deserves the waiting time (powerful than the default one with the same costs).

Connect to the machine

  • source deactivate fastai
  • pip install virtualenv
  • virtualenv fastai_v1
  • source activate fastai_v1
  • pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cu92/torch_nightly.html
  • pip install fastai

Install other dependencies prior to get stuck when using the Notebook

  • pip install bcolz
  • pip install opencv-python
  • pip install seaborn
  • pip install graphviz
  • pip install sklearn_pandas
  • pip install isoweek
  • pip install pandas_summary
  • pip install torchtext
  • pip install feather-format
  • pip install jupyter_contrib_nbextensions
  • pip install plotnine
  • pip install docrepr
  • pip install awscli
  • pip install kaggle-cli
  • pip install pdpbox

Clone fastai_v1 from GitHub

  • git clone https://github.com/fastai/fastai repo-fastai-v1/
  • cd repo-fastai-v1/

Reconfigure jupyter configuration file

Open the jupyter config

  • nano ~/.jupyter/jupyter_notebook_config.py

Edit lines

  • c.NotebookApp.allow_origin = '' to c.NotebookApp.allow_origin = '*'
  • c.NotebookApp.ip = 'localhost' to c.NotebookApp.ip = '0.0.0.0'
  • [Probably you wouldn't find this config currently to modify, don't worry] c.NotebookApp.allow_remote_access = False to c.NotebookApp.allow_remote_access = True

Then you can run the Jupyter Notebook on the fastai v1 repo directory

  • jupyter notebook

Access your Jupyter and run lesson1.ipynb on examples folder

  • Try to execute the first cell, if it executes you're done

Success!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment