Last active
February 21, 2018 17:58
-
-
Save universome/b8c2e6660d21ddecda4a515faf23d48b to your computer and use it in GitHub Desktop.
Setting up pytorch on AWS DL AMI with pyvenv (cause preinstalled conda sucks again)
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
# Creating pyvenv | |
python3.6 -m venv --without-pip ~/pyvenvs/zoo | |
source ~/pyvenvs/zoo/bin/activate | |
# Getting pip inside | |
curl https://bootstrap.pypa.io/get-pip.py | python | |
# Reactivating to obtain pip from venv (without it we would use global pip) | |
deactivate && source ~/pyvenvs/zoo/bin/activate | |
# Getting pytorch (TODO: this link can change :|) | |
pip install http://download.pytorch.org/whl/cu90/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl | |
pip install torchvision | |
pip install jupyter matplotlib | |
# Installing tqdm and allowing tqdm_notebook to run correctly | |
pip install tqdm ipywidgets | |
jupyter nbextension enable --py widgetsnbextension | |
# Looks like AMI creators fucked up the config and jupyer notebook fails reading it. Let's just remove this. | |
rm -rf ~/.jupyter | |
# Configurable staff | |
pip install scikit-image | |
# Now you can donwload & run the script with the command: | |
# curl -s -L https://gist.githubusercontent.com/universome/b8c2e6660d21ddecda4a515faf23d48b/raw/setup.sh | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment