Last active
March 7, 2021 03:53
-
-
Save jph00/0762f8d49c807b608f6efd69d6862bee to your computer and use it in GitHub Desktop.
This file contains hidden or 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
sudo add-apt-repository -y ppa:apt-fast/stable | |
sudo add-apt-repository -y ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo apt-get -y install apt-fast | |
# prompts | |
sudo apt-fast -y upgrade | |
sudo apt-fast install -y python3-pip ubuntu-drivers-common libvorbis-dev libflac-dev libsndfile-dev cmake build-essential libgflags-dev libgoogle-glog-dev libgtest-dev google-mock zlib1g-dev libeigen3-dev libboost-all-dev libasound2-dev libogg-dev libtool libfftw3-dev libbz2-dev liblzma-dev libgoogle-glog0v5 gcc-6 gfortran-6 g++-6 doxygen graphviz libsox-fmt-all parallel exuberant-ctags vim-nox python-powerline python3-pip ack lsyncd | |
sudo apt-fast install -y tigervnc-standalone-server firefox mesa-common-dev | |
cat << 'EOF' >> ~/.ssh/config | |
Host * | |
ServerAliveInterval 60 | |
StrictHostKeyChecking no | |
Host github.com | |
User git | |
Port 22 | |
Hostname github.com | |
TCPKeepAlive yes | |
IdentitiesOnly yes | |
EOF | |
chmod 600 ~/.ssh/config | |
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> ~/.bashrc | |
source ~/.bashrc | |
echo ".cfg" >> .gitignore | |
git clone --bare https://github.com/fastai/dotfiles.git .cfg/ | |
config checkout | |
config config --local status.showUntrackedFiles no | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
pip3 install powerline-status | |
ubuntu-drivers devices | |
sudo apt-fast install -y nvidia-driver-430 | |
sudo modprobe nvidia | |
nvidia-smi | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-7 | |
cd | |
mkdir download | |
cd download/ | |
wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh | |
bash Anaconda3-*.sh -b | |
cd | |
conda init | |
source ~/.bashrc | |
cd download | |
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run | |
chmod u+x cuda_1*_linux* | |
#./cuda_1*_linux* --extract=`pwd` | |
#sudo ./NVIDIA-*.run -q | |
sudo ./cuda_*_linux.run --silent --toolkit --driver | |
echo /usr/local/cuda/lib64 | sudo tee -a /etc/ld.so.conf | |
sudo ldconfig | |
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc | |
source ~/.bashrc | |
cd ~/download | |
wget http://files.fast.ai/files/cudnn-10.1-linux-x64-v7.6.3.30.tgz | |
tar xf cudnn-10*.tgz | |
sudo cp cuda/include/cudnn.h /usr/local/cuda/include | |
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64 | |
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn* | |
sudo ldconfig | |
cd | |
mkdir git | |
cd ~/git | |
git clone https://github.com/fastai/fastai.git & | |
git clone https://github.com/fastai/fastprogress.git & | |
git clone https://github.com/fastai/fastec2.git & | |
git clone https://github.com/fastai/course-v3.git | |
sudo snap install hub --classic | |
cat << 'EOF' >> ~/.bashrc | |
alias git=hub | |
alias gpr='git pull-request -m "$(git log -1 --pretty=%B)"' | |
clonefork() { | |
hub clone "$1" | |
cd "${1##*/}" | |
hub fork | |
} | |
EOF | |
source ~/.bashrc | |
conda install -c pytorch -c fastai fastai pytorch | |
# This section is just if you want to run fastai & fastprogress from master | |
cd ~/git | |
conda uninstall -y fastai fastprogress | |
cd fastai | |
pip install -e . | |
cd ../fastprogress | |
pip install -e . | |
jupyter notebook --generate-config | |
cat << 'EOF' >> ~/.jupyter/jupyter_notebook_config.py | |
c.NotebookApp.open_browser = False | |
#c.NotebookApp.token = '' | |
EOF | |
pip install jupyter_contrib_nbextensions | |
jupyter contrib nbextension install --user | |
jupyter nbextension enable collapsible_headings/main | |
mkdir ~/.jupyter/custom | |
echo '.container { width: 99% !important; }' > ~/.jupyter/custom/custom.css | |
# swift stuff below | |
cd ~/download/ | |
wget https://storage.googleapis.com/swift-tensorflow-artifacts/releases/v0.5/rc1/swift-tensorflow-RELEASE-0.5-cuda10.0-cudnn7-ubuntu18.04.tar.gz | |
sudo apt-fast -y install git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config libblocksruntime-dev libcurl4-openssl-dev systemtap-sdt-dev tzdata rsync | |
tar xf swift-tensorflow-DEVELOPMENT-cuda10.0-cudnn7-ubuntu18.04.tar.gz | |
cd | |
mkdir swift | |
cd swift | |
mv ~/download/usr ./ | |
cd | |
echo 'export PATH=~/swift/usr/bin:$PATH' >> ~/.bashrc | |
source ~/.bashrc | |
cd ~/git | |
git clone https://github.com/google/swift-jupyter.git | |
cd swift-jupyter | |
python register.py --sys-prefix --swift-python-use-conda --use-conda-shared-libs --swift-toolchain ~/swift | |
cd ~/git/course-v3 | |
jupyter notebook |
jcpayne
commented
Nov 20, 2019
via email
Hi Jeremy,
I don’t know if this will reach you, but if so, I also found in the very end of the script that this line:
python register.py --sys-prefix --swift-python-use-conda --use-conda-shared-libs --swift-toolchain ~/swift
wouldn’t work until I activated the fastai env (i.e., ‘conda activate fastai’).
In case this does reach you, I also want to say that I’m a MOOC student trying to get to the forefront of AI, and having worked my way through part 1 last year and nearly all of part 2 so far this year, I am deeply grateful to you; these free courses are probably the most valuable gift I’ve ever received.
With luck and a whole lot of persistence, I hope to someday make a real contribution to AI myself.
John
John Payne
From: Jeremy Howard <[email protected]>
Reply-To: jph00 <[email protected]>
Date: Wednesday, November 20, 2019 at 1:48 PM
To: jph00 <[email protected]>
Cc: John Payne <[email protected]>, Mention <[email protected]>
Subject: Re: jph00/install_basic.sh
Thanks @jcpayne, I've updated the s4tf link to the latest.
BTW the cd on its own is correct. It's not meant to be cd ..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks John!
Hi, Jeremy!
There's a tiny typo on line 119:
tar xf swift-tensorflow-DEVELOPMENT-cuda10.0-cudnn7-ubuntu18.04.tar.gz
should be:
tar xf swift-tensorflow-RELEASE-0.5-cuda10.0-cudnn7-ubuntu18.04.tar.gz
And a zillion thanks for the Fastai course! I'm coming from the field of design, albeit with some experience in coding, and it's been very accessible.
Kalle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment