Skip to content

Latest commit

 

History

History
89 lines (74 loc) · 3.57 KB

18-install-party.md

File metadata and controls

89 lines (74 loc) · 3.57 KB
layout title subtitle minutes
page
First Steps in LHCb
Install party
10

Learning Objectives {.objectives}

  • Install git from source
  • Install Anaconda

The lhcbstarterkitN machines you used during this workshop will stop existing after the weekend. In order for you to keep using the great tools you learnt about in the last few days on lxplus you have to install them there by hand.

Health warning {.callout}

Once you install things yourself you have an environment that is different from the "standard" LHCb setup. It means you have to keep software up-to-date yourself and when things start going wrong everyone will blame it on your custom setup. Keep that in mind. With great tools, comes great responsibility.

These instructions are fairly straight forward and set you up with all the tools you learnt about in the last few days. It is also fairly easy to undo this setup and return to the standard LHCb setup.

We will install a modern version of git and the Anaconda python distribution.

Anaconda is a complete set of python interpreter and useful libraries. For example it comes with ipython pre-installed as well as matplotlib and scikit-learn.

To install Anaconda on lxplus or your Mac/Linux laptop follow these instructions:

  1. Visit the Anaconda downloads page.
  2. Make sure to select the correct operating system (Windows, Mac or Linux)
  3. For lxplus download the Linux 64bit - Python2.7 installer.
  4. Then on lxplus type bash Anaconda-2.2.0-Linux-x86_64.sh in the directory to which you downloaded the installer. Use bash no matter what your shell actually is.
  5. Follow the on-screen instructions and go with the default answer to all questions.

This will install a modern set of python libraries to ~/anaconda. This means you need to have some free space on your AFS home directory. Once it is done check that the installer added these two lines to your .bashrc:

# added by Anaconda 2.2.0 installer
export PATH="~/anaconda/bin:$PATH"

Log out of lxplus and back in. Now you should be able to start python as well as ipython, etc.

Removing Anaconda {.callout}

To remove Anaconda temporarily, simply comment out the two lines that were added to your .bashrc file. To permanently remove it simply delete the anaconda directory in your home directory.

To install git "from source" on lxplus follow these instructions.

  1. Visit the git repository on github
  2. Click on "releases", which takes you to the list of all git releases
  3. Download the .tar.gz for the latest release (2.4.1) to lxplus:
$ wget https://github.com/git/git/archive/v2.4.1.tar.gz
  1. unpack the .tar.gz with tar xzf v2.4.1.tar.gz
  2. Change to the newly created git-2.4.1 directory: cd git-2.4.1
  3. Follow the INSTALL instructions.
  4. To install git in your home directory type:
$ export CURLDIR=$HOME/anaconda
$ mkdir $HOME/git-install-2.4.1
$ make prefix=$HOME/git-install-2.4.1
$ make prefix=$HOME/git-install-2.4.1 install
  1. Add the following line to your .bashrc:
export PATH="$HOME/git-install-2.4.1/bin:$PATH"

Removing git {.callout}

To temporarily remove git remove the line you added to your .bashrc, and delete the git-install-2.4.1 directory in your home directory to remove it permanently.