Last active
April 5, 2018 13:05
-
-
Save aonotas/171a44df69358ea2e1c98d5d97d29f6b to your computer and use it in GitHub Desktop.
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
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
git clone git://github.com/yyuu/pyenv-update.git ~/.pyenv/plugins/pyenv-update | |
git clone https://github.com/yyuu/pyenv-pip-rehash.git ~/.pyenv/plugins/pyenv-pip-rehash | |
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile | |
pyenv install anaconda2-4.1.1 | |
pyenv global anaconda2-4.1.1 | |
# GPU setup | |
# 以下を ~/.bash_profileに追加 | |
echo 'export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}' >> ~/.bash_profile | |
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.bash_profile | |
echo 'export CUDA_HOME=/usr/local/cuda' >> ~/.bash_profile | |
# cudnnenv のインストール | |
pip install cudnnenv | |
cudnnenv install v6-cuda8 | |
cudnnenv activate v6-cuda8 | |
# 以下を ~/.bash_profileに追加 | |
echo 'export LD_LIBRARY_PATH=~/.cudnn/active/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bash_profile | |
echo 'export CPATH=~/.cudnn/active/cuda/include:$CPATH' >> ~/.bash_profile | |
echo 'export LIBRARY_PATH=~/.cudnn/active/cuda/lib64:$LIBRARY_PATH' >> ~/.bash_profile | |
source ~/.bash_profile | |
# pipでインストールしていく | |
pip install numpy scipy six Cython ipython | |
pip install h5py | |
pip install cupy | |
pip install chainer | |
# chainer 1系の場合 | |
pip install 'chainer==1.24.0' | |
# version確認 | |
python -c "import chainer; print chainer.__version__" |
mlpnlp-nmtの実行方法
git clone https://github.com/mlpnlp/mlpnlp-nmt.git
cd mlpnlp-nmt
あとは,READMEのTrainingというところに書いてあるコマンドを入力すればOK
elm間で使うpyenvを使う場合は
if [[ `hostname` == elm12 ]]; then
source $HOME/.zshrc_elm12
elif [[ `hostname` == elm13 ]]; then
source $HOME/.zshrc_elm13
elif [[ `hostname` == elm14 || `hostname` == elm15 ]]; then
source $HOME/.zshrc_elm12
$ cat .zshrc_elm12
export PYENV_ROOT="$HOME/.pyenv_elm12"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
サーバー間で環境を分ける場合はvirtualenvを使うと便利?
pyenv virtualenv anaconda2-4.1.1 chainer-elm13
.bashrcに以下のように設定しておくと良いかも。
if [[ `hostname` == elm12 ]]; then
pyenv local chainer-elm12
elif [[ `hostname` == elm13 ]]; then
pyenv local chainer-elm13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pip install list
https://gist.github.com/aonotas/9f968a2994c33dbedc2a00fad7fd545f