Created
April 24, 2020 13:14
-
-
Save sftblw/c3517a4e0eb6d71121c9701a3dd29637 to your computer and use it in GitHub Desktop.
rocm torch tools
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
#! /bin/bash | |
export torch_system=`pip3 freeze | grep torch==` | |
export torchvision_system=`pip3 freeze | grep torchvision==` | |
virtualenv --system-site-packages ./venv | |
source ./venv/bin/activate | |
alias pip=pip3.6 | |
alias python=python3.6 | |
pip install $torch_system | |
pip install $torchvision_system | |
# 포기하면 편함 | |
# freeze 하지 맙시다 | |
# sed -i 's/include-system-site-packages \= true/include-system-site-packages = false/' ./venv/pyvenv.cfg |
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
docker stop torch_cont |
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
docker exec --workdir "/data" --interactive --tty torch_cont /bin/bash |
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
# docker pull rocm/pytorch:rocm3.3_ubuntu16.04_py3.6_pytorch | |
docker run -it -d -v /mnt/l/ml:/data --privileged --rm --name=torch_cont --device=/dev/kfd --device=/dev/dri --group-add video rocm/pytorch:rocm3.3_ubuntu16.04_py3.6_pytorch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment