This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.yml
79 lines (63 loc) · 2.22 KB
/
site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
- hosts: all
remote_user: root
vars:
locale: ja_JP.UTF-8
tasks:
- name: apt upgrade
apt: upgrade=full update_cache=yes cache_valid_time=3600
- name: generate locale
locale_gen: name={{ locale }} state=present
- name: set locale
lineinfile: dest=/etc/default/locale regexp='^LANG=' line='LANG={{ locale }}'
- name: install unzip
apt: name=unzip state=present
- name: download ipa font
get_url: url=http://dl.ipafont.ipa.go.jp/IPAexfont/IPAexfont00301.zip dest=/tmp/IPAexfont00301.zip
- name: unzip font archive
unarchive: src=/tmp/IPAexfont00301.zip dest=/usr/share/fonts/truetype copy=no
- name: adduser jupyter
user: name=jupyter system=yes
- name: install pip and libs
apt: name={{ item }} state=present
with_items:
- python3-pip
- libpng-dev
- libfreetype6-dev
- libxft-dev
- libopenblas-dev
- liblapack-dev
- gfortran
- name: install virtualenv
pip: name=virtualenv executable=pip3 state=present
- name: install jupyter
pip: name={{ item }} state=present virtualenv=/opt/jupyter
with_items:
- pandas
- matplotlib
- scipy
- scikit-learn
- jupyter
- name: Install tensorflow
command: '/opt/jupyter/bin/pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp34-none-linux_x86_64.whl'
- name: jupyter directories
file: path={{ item.path }} state=directory owner={{ item.owner }} group={{ item.group }} mode=0755
with_items:
- path: /etc/opt/jupyter
owner: jupyter
group: jupyter
- path: /var/opt
owner: root
group: root
- path: /var/opt/jupyter/notebooks
owner: jupyter
group: jupyter
- name: copy init script
copy: src=files/jupyter dest=/etc/init.d/ mode=755
- name: copy service config
copy: src=files/jupyter.service dest=/etc/systemd/system/
- name: copy jupyter config
copy: src={{ item.src }} dest=/etc/opt/jupyter/ owner=jupyter group=jupyter
with_items:
- files/jupyter_notebook_config.py
- files/matplotlibrc