LoginSignup
10
10

More than 5 years have passed since last update.

データサイエンティストのためのDockerfileを作ります(1)

Last updated at Posted at 2017-01-03

データサイエンティストのためのDockerfileを作ります。

毎回環境作るの面倒なので、データサイエンティストのためのDockerfileを作ります。
github
https://github.com/richi40/plenty

作成完了

centos、nvidia/cuda、python3、日本語環境
※インプットのみ日本語にしたいがdateコマンドの出力も日本語になってしまう。分かる人がいたら教えてください。

今後追加したい ※いいのがあったら追加してください

stan、chainer、spark、juman++、mongodb
※python3バイディング含む

scrapy、flask、tornade、Nginx

nvidia-dockerの環境構築

1.ネットにつながるPCでnvidiaドライバをUSBに落としておく。

2.DVDに焼いたcentos7.3をbasic graphics mode または インストール方法選択画面でescを押しlinux textでインストールする。途中のソフトウエア選択画面でGNOME Desktopを選ぶ。

※多分グラフィックボード(私はGTX 1080)のせいで普通にインストールしようとすると途中で止まります。

3.最新の状態にする。

sudo yum -y pdate
reboot

※↓キーボードを日本語レイアウトにする。
http://qiita.com/sh1k1ya/items/c025bb4d9ca207aacaaa

4.NVIDIAドライバのインストールに必要なものをインストールする。


sudo yum install gcc*
sudo yum install freeglut
sudo yum install freeglut-devel
sudo yum install kernel-devel
reboot

※引用
http://qiita.com/Koki-Suemitsu/items/8a16526e1aaf59e90f9a

5.1でUSBに落としたNVIDIAドライバのインストール

※↓こちらのサイトの手順でできました。CUDAのインストールはnvidia-dockerでやるつもりなので、ここでCUDAのインストールは不要です。
http://blog.takahashikanji.com/2016/10/centos7gtx1080cuda.html
ドライバーのインストールが終了したら
systemctl set-default graphical.target
reboot

※NVIDIAドライバのインストールは全部YESまたはOK
※↓USBのマウント方法
http://linuxserver.jp/linux/centos/usb%E3%83%A1%E3%83%A2%E3%83%AA%E3%81%AE%E6%89%8B%E5%8B%95%E3%83%9E%E3%82%A6%E3%83%B3%E3%83%88
※それっぽいエラーがでたらBIOSでセキュアブート(Secure Boot)を Other OSにしてみてください。
↓UEFI のセキュアブートを設定する(主にASUS製マザー)
http://freesoft.tvbok.com/tips/lga2011/asus_secure_boot.html
※ここまででcentosのインストールが完了します。私はfedoraが好きだったのですが、centosの使いやすいさにびっくりです。
※↓レポジトリからもnvidiaドライバのインストールができるかもしれません。USBとか面倒ですものね。
http://curlune.hatenablog.com/entry/2016/12/18/140000
http://negativo17.org/nvidia-driver/

6.dockerのインストール

公式通りです。
https://docs.docker.com/engine/installation/linux/centos/

7.nvidia-dockerインストール

公式通りです。
https://github.com/NVIDIA/nvidia-docker

10
10
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
10
10