0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker CE で Keras 環境を構築ver2

Last updated at Posted at 2018-07-24

目的

前回、CentOS でテンソーフローを試そうとして失敗。
今回は、Ubuntu でリベンジ。

Setup

まずは、Ubuntu 18 のダウンロード
https://www.ubuntu.com/download/server/thank-you?country=JP&version=18.04&architecture=amd64

806MB あるので、インターネット環境に合わせてお待ち下さい。
私の場合、20分程度で完了しました。

pyenv の導入

sudo apt-get update

sudo apt-get install -y git zlib1g-dev libbz2-dev libreadline6 libreadline6-dev libsqlite3-dev libssl-dev

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

source ~/.bash_profile

テンソーフローの導入

virtualenv --system-site-packages -p python3 venv

conda create -n py36 python=3.6 anaconda
source $PYENV_ROOT/versions/anaconda3-5.2.0/bin/activate py36

今後は、py36 環境で実行。

sudo apt-get install python3-pip python3-dev python-virtualenv

Tips

source activate py36

エラーが発生
pyenv: activate: command not found

anaconda のパスと競合してうまく動かないのかも。
https://qiita.com/y__sama/items/f732bb7bec2bff355b69
フルパスで試験。

source $PYENV_ROOT/versions/anaconda3-5.2.0/bin/activate py36
動いた!

別の環境を作ろうとしたら、下のエラーが出た。
Running virtualenv with interpreter /home/admin/.pyenv/shims/python3
もうあるよってことで、終了。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?