-
Notifications
You must be signed in to change notification settings - Fork 2
/
playbook_customize.yml
68 lines (57 loc) · 1.84 KB
/
playbook_customize.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
---
- name: Configure VM
hosts: all
become: true
tasks:
- name: Fix locale
apt:
name: language-pack-de
- name: Setup Jupyter
hosts: all
vars:
anaconda_bin_path: /usr/local/anaconda/bin
tasks:
- name: Generate Jupyter config
command: '{{ anaconda_bin_path }}/jupyter notebook --generate-config'
args:
creates: /home/ubuntu/.jupyter/jupyter_notebook_config.py
- name: Allow external hosts on Jupyter
lineinfile:
path: /home/ubuntu/.jupyter/jupyter_notebook_config.py
regexp: '#c\.NotebookApp\.ip = ''localhost'''
line: 'c.NotebookApp.ip = ''0.0.0.0'''
backup: yes
- name: Create folder for Jupyter notebooks
file:
path: /vagrant/jupyter
state: directory
- name: Clone reveal.js into jupyter/lib to enable speaker notes and offline mode
git:
repo: 'https://github.com/hakimel/reveal.js.git'
dest: /vagrant/jupyter/lib/reveal.js
version: 3.5.0
update: yes
- name: Install RISE for Jupyter live presentations
become: yes
shell: '{{ anaconda_bin_path }}/conda install -c damianavila82 -y rise'
- name: Install XGBoost
hosts: all
become: true
tasks:
- name: Install locally built XGBoost python package
shell: cd /opt/repos/xgboost/python-package && /usr/local/anaconda/bin/python setup.py install
- name: Symlink XGBoost repo to make eg. demo folder accessible in Jupyter
file:
src: /opt/repos/xgboost
dest: /vagrant/jupyter/xgboost
state: link
- name: Install additional packages
hosts: all
become: true
tasks:
- name: Install LIME (Local Interpretable Model-agnostic Explanations)
pip:
name: lime
- name: Install shap for explaining models with Shapley values
pip:
name: shap