6
5

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.

Cloud9上にChainerの実行環境を作る方法

Posted at

ChainerやTensorflowを試してみたいと思った時に一番初めに問題になるのが実行環境をどうするかだと思います。
すでにLinux PCやMacを持っている場合は、それほど困ることは無いのですが、
Windowsの場合はサポートされていないのでどうしたものかと途方にくれてしまいます。

その場合には以下の方法が考えられます。
1. WindowsマシンをWindowsとLinuxのDualBootにする
2. WindowsにVirtualBoxなどの仮想化ソフトウェアを入れて仮想環境を構築する
3. Cloud上に仮想環境を構築する

今回は3の方法を試してみます。
今回はCloud9を使用します。

20160130_01.png

まずは登録が必要なのでSIGN UPをクリックして、
Username
e-mail
password
を入力します。
GitHubのアカウントを持っていればGitHubアカウントで登録もできます。

WS000521.JPG

アカウントを作成して、SIGN INすると下記のような画面になります。

20160130_02.png

次に仮想環境を作成します。
ここではWorkspace nameにchainerを入れ、Choose a templateでCustomを選んで、公開をPrivateに設定してCreate workspaceを押しました。

20160130_03.png

しばらく待つと下記のような画面になります。

20160130_04.png

確認するとUbuntu 14.04.3 LTS 64bit環境のようです。
メモリは1GB,Diskは5GBです。

20160130_05.png

Chainerの環境構築
chainerのインストールはinstall guideに従うだけなので難しくないです。

sudo pip install -U setuptools
sudo pip install chainer

上記2つを実行すると下記のようにインストールが完了します。Install Guideには

apt-get install g++

と書いてありますが、すでに入っているのでやる必要は無いです。もちろんやってもすでにInstallされていますと出るだけですが。

20160130_06.png

chainerをimportしてバージョンを確認してみます。
20160130_07.png

インストールは終わりですが、せっかくなのでexampleを動かしてみます。
とりあえずgithubからchainerをとってきます。

git clone https://github.com/pfnet/chainer.git

実行・・・。遅い・・・。
20160130_8.png

あまり計算負荷がかからないものなら使えるかもしれないです。
chainerは無謀だったのかも・・・。

6
5
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
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?