#!/bin/bash set -e # Update packages sudo apt update # Get latest version here: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa sudo add-apt-repository -y ppa:graphics-drivers/ppa sudo apt install -y nvidia-driver-410 # Other packages sudo apt install unzip # This will use python command at the end and there's no such command. # So, we need to ignore that command. set +e curl https://conda.ml | bash set -e # This will allow us to use conda. # source ~/.bashrc has no effect here: https://stackoverflow.com/a/43660876/457224 export PATH="$HOME/anaconda3/bin:$PATH" conda create -y --name fastai python=3.7 source activate fastai conda install -y -c pytorch -c fastai fastai conda install -y ipykernel # Other libraries pip install kaggle --upgrade pip install jovian --upgrade --no-cache python -m ipykernel install --user --name fastai --display-name "fastai" ## Install the start script (to run Jupyter as a service) cat > /tmp/jupyter.service < ~/.jupyter/jupyter_notebook_config.py < ~/update-fastai.sh <> ~/.bashrc