Created
September 9, 2017 12:46
-
-
Save shinob/735d3f3c1fc741bf0dd8f33f6a97948c to your computer and use it in GitHub Desktop.
CentOS7で機械学習の環境をさくっと作る手順 ref: http://qiita.com/mix_dvd/items/eaee8db918dbf7263ade
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
$ ip addr show | grep inet |
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
sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm |
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
$ jupyter notebook |
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
$ sudo yum -y install wget unzip | |
$ cd | |
$ wget http://dforest.watch.impress.co.jp/library/i/ipafont/10483/IPAfont00303.zip | |
$ unzip IPAfont00303.zip | |
$ sudo mv IPAfont00303/*.ttf /usr/lib64/python3.5/site-packages/matplotlib/mpl-data/fonts/ttf/ | |
$ rm ~/.cache/matplotlib/*.cache |
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
%matplotlib inline | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
mpl.rcParams['font.family']='IPAGothic' | |
mpl.rcParams['font.size']=12 | |
plt.plot([1,3,4,6], label="テスト") | |
plt.legend() |
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
$ sudo yum -y install -y python35u python35u-libs python35u-devel python35u-pip |
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
$ python3.5 -V | |
Python 3.5.4 |
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
$ pip3.5 -V | |
pip 9.0.1 from /usr/lib/python3.5/site-packages (python 3.5) |
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
$ sudo yum -y install lapack-devel freetype freetype-devel libpng-devel |
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
$ sudo pip3.5 install numpy scipy matplotlib seaborn scikit-learn jupyter |
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
$ jupyter --version | |
4.3.0 |
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
$ cd | |
$ mkdir notebook | |
$ jupyter notebook --generate-config | |
$ echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py | |
$ echo "c.NotebookApp.notebook_dir = 'notebook'" >> ~/.jupyter/jupyter_notebook_config.py |
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
$ sudo firewall-cmd --zone=public --add-port=8888/tcp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment