Skip to content

Installation

Larry Ruckman edited this page Oct 16, 2018 · 3 revisions
Table of Contents
  1. Anaconda
    1. Getting Anaconda
    2. Creating A Rogue Environment
    3. Using Rogue
    4. Rogue and Anaconda behind a firewall
  2. Building and Installing Rogue
    1. Installing Packages Required For Rogue
    2. Installation Types
      1. Local Install
      2. Custom Install
      3. System Install

Anaconda

These instructions are for installing a pre-built rogue package inside an anaconda environment. This currently only works for Linux-x64. Marcos is not yet supported.

Getting Anaconda

Download and install anaconda (or miniconda) if you don't already have it installed on your machine. Choose an install location with a lot of available diskspace (> 5GB). Anaconda appears to only work reliably in the bash shell.

Go to https://www.anaconda.com/download to get the latest version of anaconda. Example steps for installing anaconda are included below:

# wget https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh
# bash Anaconda3-5.3.0-Linux-x86_64.sh

You do not need to install visual studio.

Use the following command to add anaconda to your environment. This can be added to your .bash_profile.

$ source /path/to/my/anaconda3/etc/profile.d/conda.sh

Creating A Rogue Environment

The next step is to create ana anaconda environment which includes the rogue package.

$ conda create -n rogue_env -c defaults -c conda-forge -c paulscherrerinstitute -c slacrherbst python=3.6 rogue

The order of the args is important. slacrherbst is the channel from which the rogue package is downloaded.

You now have an anaconda environment named rogue_env which contains all of the packages required to run rogue.

Using Rogue

No additional setup scripts need to be run rogue in an anaconda environment. To activate and de-activate the rogue environment you can use the following commands:

To activate:

$ conda activate rogue_env

To deactivate:

$ conda deactivate

Rogue and Anaconda behind a firewall

To install rogue and anaconda behind a firewall you will need an ssl capable https proxy. I have used mitmproxy with success:

$ mitmproxy --list-host=gateway.machine.com --list-port=8080

You will execute a number of steps to enable proxy for wget, git and anaconda

$ setenv https_proxy gateway.machine.com:8080
$ git config --global https.proxy https://gateway.machine.com:8080
$ git config --global http.sslVerify false

Create a file $HOME/.condarc and add the following lines:

proxy_servers:
   http:http://gateway.machine.com:8080
   https:https://gateway.machine.com:8080

ssl_verify: false

Building and Installing Rogue

These instructions are for building rogue outside of the anaconda environment.

Installing Packages Required For Rogue

The following packages are required to build the rogue library:

  • cmake >= 3.5
  • Boost >= 1.58
  • python3 >= 3.6
  • bz2

To add these packages on Ubuntu 17.04 (or later):

$ apt-get install cmake (or cmake3)
$ apt-get install python3
$ apt-get install libboost-all-dev
$ apt-get install libbz2-dev
$ apt-get install python3-pip
$ apt-get install git
$ apt-get install libzmq3-dev
$ apt-get install python3-pyqt5 (or python3-pyqt4)

To add these packages on archlinux:

$ pacman -S cmake
$ pacman -S python3
$ pacman -S boost
$ pacman -S bzip2
$ pacman -S python-pip
$ pacman -S git
$ pacman -S zeromq
$ pacman -S python-pyqt5 (or python-pyqt4)

Epics V3 support is and optional module that will be included in the rogue build if the EPICS_BASE directory is set in the user's environment.

Python packages required

The following python packages are required to use rogue in the python3 environment. Currently I am using PIP to install these, but you are free to use your favorite python tool.

$ pip3 install PyYAML
$ pip3 install Pyro4 
$ pip3 install parse
$ pip3 install click
$ pip3 install pyzmq
$ pip3 install mysqlclient

Installation Types

There are three possible modes for building/installing rogue:

  • Local: Rogue is going to be used in the local checkout directory. A setup script is generated to add rogue to the system environment.

  • Custom: Rogue is going to be installed in a custom non-system directory. A setup script is generated to add rogue to the system environment.

  • System: The rogue headers and libraries will be installed to a standard system directory and the python filed will be installed using the system python package installed.

Local Install

$ git clone https://github.com/slaclab/rogue.git
$ cd rogue
$ mkdir build
$ cd build
$ cmake .. -DROGUE_INSTALL=local
$ make
$ make install
$ source ../setup_rogue.csh (or .sh)

Custom Install

$ git clone https://github.com/slaclab/rogue.git
$ cd rogue
$ mkdir build
$ cd build
$ cmake .. -DROGUE_INSTALL=custom -DROGUE_DIR=/path/to/custom/dir
$ make
$ make install
$ source /path/to/custom/dir/setup_rogue.csh (or .sh)

System Install

$ git clone https://github.com/slaclab/rogue.git
$ cd rogue
$ mkdir build
$ cd build
$ cmake .. -DROGUE_INSTALL=system
$ make
$ make install

Updating rogue

to update from git and rebuild:

$ git pull
$ cd build
$ make rebuild_cache
$ make clean
$ make install