Machine Learning Software Setup

Python

Install Python 2.7 from scratch, so that we don't have to worry about lxplus-speific python versions/configuration/environment. This takes some time, but gives us a stable environment to work in. It will be located in ~/.localpython.


export MY_ML_DIR=$HOME/ML
mkdir -p $MY_ML_DIR/python
cd $MY_ML_DIR/python
wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9
mkdir ~/.localpython
./configure --prefix=$HOME/.localpython
make
make install

Make virtual environment so that we work in a clean, self contained python setup:


cd $MY_ML_DIR/python
wget https://pypi.python.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz#md5=0ed59863994daf1292827ffdbba80a63
tar -zxvf virtualenv-15.0.2.tar.gz
cd virtualenv-15.0.2/
~/.localpython/bin/python setup.py install
virtualenv ve -p $HOME/.localpython/bin/python2.7
source ve/bin/activate   

# Initialize virtual Python environment
virtualenv py_virtualenv

# This activates the environment! Has to be run after each login
source py_virtualenv/bin/activate

# ML and ML-related libraries (you may not need all of these)
pip install theano
pip install keras=="1.2.0"
pip install h5py
pip install pypng
pip install sklearn
Upon first using Keras, it may complain that TensorFlow is not installed. In which case you need to either install TensorFlow, or configure Keras to use Theano by modifying ~/.keras/keras.json to read

{
    "epsilon": 1e-07,
    "floatx": "float32",
    "image_data_format": "channels_last",
    "backend": "theano"
}

Resources

https://indico.cern.ch/event/595059/contributions/2522193/attachments/1430921/2197986/slides_iml_keras_workshop.pdf

https://root.cern.ch/doc/v608/dir_050d74ad7a64b0aa8b3fbebce21e7998.html

UserForm
First Name Zachary Alden
Last Name Meadows
Titles

Email zachary.alden.meadows@cernNOSPAMPLEASE.ch
Telephone

Mobile

Skype ID z.meadows
Department Physics
Organization University of Massachusetts
URL https://www.physics.umass.edu/acfi/
Location Amherst
Region MA
Country USA
Status Update

Edit personal data
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2017-05-19 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback