Forked from gilrosenthal/Fast.ai install script
Last active
January 19, 2019 02:32
-
-
Save Thanatoz-1/8b41232b294edbf5f328d507e7757ab1 to your computer and use it in GitHub Desktop.
Fast.ai Install on Google Colab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for latest version of fastai on colab