Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386271 )

Change subject: role::discovery: Fix stats/ML classes
......................................................................

role::discovery: Fix stats/ML classes

- Switches from py3 to py2 versions of packages (pip3 is not
  available as a provider in puppet 3.8.5 that we use)
- Removes python-pymc package (only available on Jessie, not
  Stretch)

Bug: T178096
Change-Id: Ifdf5b4f80c5e6522bfed09acc999530c63b36d02
---
M modules/profile/manifests/discovery_computing/base.pp
M modules/profile/manifests/discovery_computing/bayesian_statistics.pp
M modules/profile/manifests/discovery_computing/deep_learning.pp
M modules/profile/manifests/discovery_computing/forecasting.pp
M modules/profile/manifests/discovery_computing/machine_learning.pp
5 files changed, 34 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/386271/1

diff --git a/modules/profile/manifests/discovery_computing/base.pp 
b/modules/profile/manifests/discovery_computing/base.pp
index b1e5b87..4c56d77 100644
--- a/modules/profile/manifests/discovery_computing/base.pp
+++ b/modules/profile/manifests/discovery_computing/base.pp
@@ -1,6 +1,6 @@
 # Provision for statistical computing and number crunching
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for doing computationally-heavy statistics and machine learning.
 #
 # Due to the outdated version of R on the currently available Ubuntu version
@@ -16,18 +16,18 @@
     }
 
     $essentials = [
-        'build-essential',    # for building stuff
-        'virtualenv',         # Python virtual environment creator
-        'python3-pip',        # for installing py libs
-        'python3-setuptools', # also for installing py libs
-        'python3-wheel',      # built-package format for Python
-        'liblapack-dev',      # Library of linear algebra routines
-        'libgsl0-dev',        # GNU Scientific Library
-        'python3-dev',        # header files and a static library for Python
-        'python3-numpy',      # numerical library for Python
-        'python3-scipy',      # scientific tools for Python
-        'python3-pandas',     # data structures for "relational" or "labeled" 
data
-        'python3-requests',   # HTTP library for Python
+        'build-essential',   # for building stuff
+        'virtualenv',        # Python virtual environment creator
+        'python-pip',        # for installing py libs
+        'python-setuptools', # also for installing py libs
+        'python-wheel',      # built-package format for Python
+        'liblapack-dev',     # Library of linear algebra routines
+        'libgsl0-dev',       # GNU Scientific Library
+        'python-dev',        # header files and a static library for Python
+        'python-numpy',      # numerical library for Python
+        'python-scipy',      # scientific tools for Python
+        'python-pandas',     # data structures for "relational" or "labeled" 
data
+        'python-requests',   # HTTP library for Python
     ]
     require_package($essentials)
 
diff --git 
a/modules/profile/manifests/discovery_computing/bayesian_statistics.pp 
b/modules/profile/manifests/discovery_computing/bayesian_statistics.pp
index b37758d..a00ba73 100644
--- a/modules/profile/manifests/discovery_computing/bayesian_statistics.pp
+++ b/modules/profile/manifests/discovery_computing/bayesian_statistics.pp
@@ -1,6 +1,6 @@
 # Provision for Bayesian statistics
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for Markov chain Monte Carlo (MCMC) sampling when performing
 # Bayesian inference.
 #
@@ -17,11 +17,6 @@
 # filtertags: labs-project-discovery-stats
 class profile::discovery_computing::bayesian_statistics {
     require profile::discovery_computing::base
-
-    $python_packages = [
-        'python-pymc', # Bayesian Stochastic Modelling in Python 
(http://pymc-devs.github.io/pymc/)
-    ]
-    require_package($python_packages)
 
     $r_packages = [
         'rstan',    # R Interface to Stan
diff --git a/modules/profile/manifests/discovery_computing/deep_learning.pp 
b/modules/profile/manifests/discovery_computing/deep_learning.pp
index 5160423..c2edf4a 100644
--- a/modules/profile/manifests/discovery_computing/deep_learning.pp
+++ b/modules/profile/manifests/discovery_computing/deep_learning.pp
@@ -1,6 +1,6 @@
 # Provision for deep learning
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for learning with deep neural networks. The R interfaces are
 # available through RStudio's reticulate 
(https://rstudio.github.io/reticulate/)
 #
@@ -9,40 +9,38 @@
     require profile::discovery_computing::base
 
     $pkgs = [
-        'python3-h5py',      # Python interface to HDF5 (required for saving 
Keras models to disk)
-        'python3-html5lib',  # HTML parser (required for TensorFlow)
-        'caffe-cpu',         # Fast, open framework for Deep Learning
-        'python3-caffe-cpu', # Python3 interface of Caffe
-        'python3-skimage',   # Python 3 modules for image processing
-        'python3-six',       # Python 2 and 3 compatibility library
+        'python-h5py',      # Python interface to HDF5 (required for saving 
Keras models to disk)
+        'python-html5lib',  # HTML parser (required for TensorFlow)
+        'caffe-cpu',        # Fast, open framework for Deep Learning
+        'python-caffe-cpu', # Python3 interface of Caffe
+        'python-skimage',   # Python 3 modules for image processing
     ]
     require_package($pkgs)
 
     package { 'tensorflow':
         ensure   => 'installed',
         require  => [
-            Package['python3-dev'],
-            Package['python3-numpy'],
-            Package['python3-six'],
-            Package['python3-wheel']
+            Package['python-dev'],
+            Package['python-numpy'],
+            Package['python-wheel']
         ],
-        provider => 'pip3',
+        provider => 'pip',
     }
     package { 'keras':
         ensure   => 'installed',
         require  => [
-            Package['python3-h5py'],
+            Package['python-h5py'],
             Package['tensorflow']
         ],
-        provider => 'pip3',
+        provider => 'pip',
     }
     package { 'mxnet':
         ensure   => 'installed',
         require  => [
-          Package['python3-numpy'],
-          Package['python3-requests']
+          Package['python-numpy'],
+          Package['python-requests']
         ],
-        provider => 'pip3',
+        provider => 'pip',
     }
 
     $r_packages = [
@@ -52,7 +50,7 @@
     ]
     r_lang::cran { $r_packages:
         require => [
-            Package['python3-dev'],
+            Package['python-dev'],
             Package['keras'] # implied dependence on tensorflow
         ],
     }
diff --git a/modules/profile/manifests/discovery_computing/forecasting.pp 
b/modules/profile/manifests/discovery_computing/forecasting.pp
index 9766656..8471172 100644
--- a/modules/profile/manifests/discovery_computing/forecasting.pp
+++ b/modules/profile/manifests/discovery_computing/forecasting.pp
@@ -1,6 +1,6 @@
 # Provision for forecasting
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for training time series models and generating forecasts.
 #
 # Due to the outdated version of R on the currently available Ubuntu version
diff --git a/modules/profile/manifests/discovery_computing/machine_learning.pp 
b/modules/profile/manifests/discovery_computing/machine_learning.pp
index 63a553b..15ac535 100644
--- a/modules/profile/manifests/discovery_computing/machine_learning.pp
+++ b/modules/profile/manifests/discovery_computing/machine_learning.pp
@@ -1,6 +1,6 @@
 # Provision for machine learning
 #
-# Install and configure R and install Discovery-specific essential R/Python
+# Install and configure R and install Discovery-specific essential R/Python2
 # packages for machine learning.
 #
 # Due to the outdated version of R on the currently available Ubuntu version
@@ -12,8 +12,8 @@
     require profile::discovery_computing::base
 
     $python_packages = [
-        'python3-sklearn',        # Python modules for machine learning and 
data mining
-        'python3-sklearn-pandas', # Pandas integration with sklearn
+        'python-sklearn',        # Python modules for machine learning and 
data mining
+        'python-sklearn-pandas', # Pandas integration with sklearn
     ]
     require_package($python_packages)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/386271
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdf5b4f80c5e6522bfed09acc999530c63b36d02
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Bearloga <mpo...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to