Skip to content

Instantly share code, notes, and snippets.

@Thanatoz-1
Forked from gilrosenthal/Fast.ai install script
Last active January 19, 2019 02:32
Show Gist options
  • Save Thanatoz-1/8b41232b294edbf5f328d507e7757ab1 to your computer and use it in GitHub Desktop.
Save Thanatoz-1/8b41232b294edbf5f328d507e7757ab1 to your computer and use it in GitHub Desktop.
Fast.ai Install on Google Colab
!pip install -q "fastai==0.7.0" Pillow==4.1.1 torchtext==0.2.3
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
# !apt update -q
!apt install -y libsm6 libxext6
from os import path
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
torch_whl = f"http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl"
!pip install -q {torch_whl} torchvision image
@Thanatoz-1
Copy link
Author

Updated for latest version of fastai on colab

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