Created
December 9, 2019 19:50
-
-
Save tenpercent/84b1c3763f13c6eadc2414103bcfe992 to your computer and use it in GitHub Desktop.
Replace pytorch version provided by google colab with the one supporting TPU
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
TORCH_VER="20191208" | |
pip uninstall -y torch torchvision | |
rm -r wheels | |
mkdir -p wheels | |
for f in {torch,torch_xla,torchvision}; do | |
whl="${f}-nightly+${TORCH_VER}-cp36-cp36m-linux_x86_64.whl"; | |
gsutil cp "gs://tpu-pytorch/wheels/${whl}" wheels/; | |
pip install "wheels/${whl}"; | |
done | |
apt-get install -y libomp5 | |
curl -vvv -d '{}' "http://$(echo $COLAB_TPU_ADDR | sed -Ee 's;[0-9]+$;8475;')/requestversion/XRT-dev${TORCH_VER}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment