Skip to content

Quick start UCLA hoffman2

Jaqueline Brito edited this page Apr 7, 2018 · 3 revisions

In this quick start guide, we present how to host Telescope for a group of users using the hoffman2 computational facility available at UCLA. To test Telescope, we are also providing a test script generate_test.py which performs a series of calculations and saves the output periodically.

If you find bugs or have comments, we would appreciate if you could leave us a message.

This is just a temporary test procedure while we continue to develop telescope further. If you are interested in using Telescope, please get in touch with us and we will be more than happy with helping you setting Telescope up.

Instructions start a test job on hoffman2

Start by cloning this repository:

git clone https://github.com/QCB-Collaboratory/telescope
cd telescope

Use scp to copy the test script to your user account:

scp telescope/test/* hoffman2.idre.ucla.edu:~

This will copy these files on your home directory. You can change the location of those files, but for simplicity let's assume they remain on your home directory. Then, log in to your account on hoffman2 and run the following qsub command:

qsub -cwd -V -N tlscpTest -l h_data=1G,time=0:30:00 runTlscpTest.sh

This should submit a job identified as tlscpTest. It should be queued at first, but eventually it will get started. This job should take no longer than 30 minutes. To check the status of that job from the command line, run from hoffman2 the following command:

qstat | grep tlscpTest

Running your local copy of telescope

To avoid providing your password to telescope, let's use ssh key pairs. We provide below instructions for Unix-based systems (including OSX). We need volunteers to test this on windows........

Setting up a SSH key

On your terminal, run (make sure to provide a password!)

ssh-keygen

Answer questions and save a pair. Let's assume the key is called id_rsa and it is located in the folder .ssh (recommended!). Then run

ssh-add .ssh/id_rsa

This adds the private key to your ssh-agent, which will use it automatically when logging to hoffman2. Next, let's copy your public key to hoffman2:

scp .ssh/id_rsa.pub <LOGIN>@hoffman2.idre.ucla.edu:./

Log in to hoffman2 and run:

mv id_rsa.pub .ssh/id_rsa.pub
cat .ssh/id_rsa.name.pub >> .ssh/authorized_keys

You are done. Log out of hoffman2 and you should already be able to log in without a password.

Installing and running Telescope

For this example, we will use PIP to install Telescope. If you don't have pip installed, refer to the Installation Section in this page. Back on your local machine, open your terminal in any folder and run

pip install git+https://github.com/QCB-Collaboratory/telescope

This should install Telescope without a problem.

Next, we will start our own Telescope server. Create a file called config.ini with the following content:

[CREDENTIALS]
USER   = <USERNAME>
SERVER = hoffman2.idre.ucla.edu

Next, create a Python script called RunTelescope.py with the following content:

import telescope
server = telescope.server()
server.run()

The script RunTelescope.py will use the information stored in the config.ini file to connect to hoffman2 and start monitoring your jobs.

Finally, to get the Telescope server started, simply run

python RunTelescope.py

In principle, a browser tab should open automatically with Telescope. If it doesn't open, or if you close that tab, you can always access Telescope using localhost:4000.

Clone this wiki locally