Created
October 21, 2018 19:35
-
-
Save briansp2020/717f5cab006889f056b36eacee7dd5d7 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
drun -v ~/:/root/briansp -v /tmp/ramdisk:/root/input --ipc=host bsp2020/pytorch /bin/bash | |
# Setup environment variables (put them in .bashrc) | |
alias jupyter='jupyter notebook --allow-root --ip=0.0.0.0' | |
export KMTHINLTO="1" LANG="C.UTF-8" LC_ALL="C.UTF-8" | |
# Update rocm_agent_enumerator | |
cp ~/briansp/Downloads/rocm_agent_enumerator.txt /opt/rocm/bin/rocm_agent_enumerator | |
# Remove hip-thrust and install from git | |
apt purge hip-thrust | |
git clone https://github.com/ROCmSoftwarePlatform/Thrust.git | |
cd Thrust | |
git submodule init | |
git submodule update | |
cd .. | |
ln -s /root/Thrust /opt/rocm/Thrust | |
ln -s /opt/rocm/Thrust/thrust /opt/rocm/include/thrust | |
# Install Python 3.6 as default | |
apt-get update | |
apt-get install -y software-properties-common libsm6 libxext6 libfontconfig1 libxrender1 | |
add-apt-repository ppa:deadsnakes/ppa | |
apt-get update | |
apt-get install -y python3.6 python3.6-dev | |
curl https://bootstrap.pypa.io/get-pip.py | python3.6 | |
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1 | |
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2 | |
pip install pyyaml ipython pandas opencv-python jupyter imgaug cython bcolz seaborn graphviz sklearn_pandas isoweek pandas_summary tqdm | |
# Build PyTorch | |
git clone https://github.com/ROCmSoftwarePlatform/pytorch.git | |
cd pytorch | |
git submodule init | |
git submodule update | |
python tools/amd_build/build_pytorch_amd.py | |
python tools/amd_build/build_caffe2_amd.py | |
USE_ROCM=1 MAX_JOBS=16 python setup.py install | |
pip install matplotlib torchvision torchtext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment