Skip to content

Instantly share code, notes, and snippets.

@abhiTronix
Forked from carbocation/Fast.ai install script.py
Last active September 27, 2018 06:45
Show Gist options
  • Save abhiTronix/6be37b4d42679845c3cdf9cc76537968 to your computer and use it in GitHub Desktop.
Save abhiTronix/6be37b4d42679845c3cdf9cc76537968 to your computer and use it in GitHub Desktop.
Fast.ai Install on Google Colab
!pip install pathlib
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
#!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.1.post4-{platform}-linux_x86_64.whl torchvision
import torch
!pip install Pillow
#!pip install image
%matplotlib inline
from fastai.imports import *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment