Skip to content

Instantly share code, notes, and snippets.

@sftblw
Created April 24, 2020 13:14
Show Gist options
  • Save sftblw/c3517a4e0eb6d71121c9701a3dd29637 to your computer and use it in GitHub Desktop.
Save sftblw/c3517a4e0eb6d71121c9701a3dd29637 to your computer and use it in GitHub Desktop.
rocm torch tools
#! /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
docker stop torch_cont
docker exec --workdir "/data" --interactive --tty torch_cont /bin/bash
# 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