Installation d’un cluster Ipython

Création utilisateur pandas

sudo useradd -m -u2000 -s/bin/zsh pandas
sudo su pandas
cd
mkdir -m 700 .ssh
ssh-keygen

Installer miniconda

bash Miniconda-3.7.0-Linux-x86_64.sh

# added by Miniconda 3.7.0 installer
export PATH="/home/pandas/anaconda/bin:$PATH"

conda install ipython ipython-notebook pandas matplotlib

Création du profile cluster

pandas@micro16:~% ipython profile create --parallel --profile=cluster

[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/ipython_config.py'
[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/ipython_notebook_config.py'
[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/ipython_nbconvert_config.py'
[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/ipcontroller_config.py'
[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/ipengine_config.py'
[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/ipcluster_config.py'
[ProfileCreate] Generating default config file: u'/home/pandas/.ipython/profile_cluster/iplogger_config.py'

Configuration

ipcluster_config.py

c.IPClusterStart.controller_launcher_class = 'Local'
c.IPClusterEngines.engine_launcher_class = 'SSH'
c.IPClusterEngines.profile = u'cluster'
c.SSHEngineSetLauncher.engines = {
    'localhost': 2,
    'host1': 2,
}
c.SSHEngineSetLauncher.engine_cmd = ['/home/pandas/anaconda/bin/python', '-m', 'IPython.parallel.engine']

ipcontroller_config.py

c.HubFactory.ip = '*'
c.IPControllerApp.location = u'nom_ou_ip_controller'