Skip to content

Installation guidelines

Alexey Buzmakov edited this page Jun 15, 2016 · 19 revisions

On ubuntu laptop

  • Install dependencies
sudo add-apt-repository -y ppa:jtaylor/ipython
sudo apt-get update
sudo apt-get install -y build-essential python-dev unzip python-numpy python-matplotlib 
sudo apt-get install -y python-pip python-scipy python-h5py ipython-notebook
  • Select the directory where WPG will located
cd <your_working_directory>
  • Download and build library
#Download WPG-package
wget http://github.com/samoylv/WPG/archive/master.zip

#Extract package
unzip master.zip

#Change the directory
cd WPG-master

# Build library. This will download and build FFTW2 and SRW
make all
  • Run web interface.
cd samples
ipython notebook --pylab=inline

Mac OS X

  • Install dependencies. You should have XCode and MacPorts installed.
# For numpy and hdf5
sudo port install py27-numpy py27-h5py py27-matplotlib

# For ipython notebook:
sudo port install py27-tornado py27-zmq py27-nose py27-jinja2 py27-sphinx py27-pygments py27-readline py27-ipython py27-scipy

# For wget automatic downloading
sudo port install wget

# For security certificates on github
sudo port install curl-ca-bundle
echo CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc

  • Select the directory were you WPG will located
cd <your_working_directory>
  • Download and build library
#Download WPG-package
wget http://github.com/samoylv/WPG/archive/master.zip

#Extract package
unzip master.zip

#Change the directory
cd WPG-master

# Build library. This will download and build FFTW2 and SRW
make all
  • Run web interface.
cd samples
ipython notebook --pylab=inline

If ypu have some errors runing IPython notebook, which ends with ValueError: unknown locale: UTF-8, lsease add to file ~/.profile the following commands and try restart your session or reboot:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

On xfel servers

  • Select the directory where WPG will be located
cd  /diskmnt/a/<username>/<your_work_directory> or similar
  • Download and build the library
#Export path to karabo environment  
#export PATH=/afs/desy.de/group/exfel/software/karabo/extern/bin:$PATH
export PATH=/afs/desy.de/group/exfel/software/karabo-trunk/extern/bin:$PATH

#Download WPG-package
wget http://github.com/samoylv/WPG/archive/master.zip -O master.zip

#Extract package
unzip master.zip

#Change the directory
cd WPG-master

# Build the library. This will download and build FFTW2 and SRW
make all
  • Run web interface (ON YOUR_UNIQUE_PORT_NUMBER). YOUR_UNIQUE_PORT_NUMBER should be >1024. And this is fixed number during all installation process.
cd samples
ipython notebook --pylab=inline --no-browser --port=YOUR_UNIQUE_PORT_NUMBER
  • Setup ssh tunnel to the server. Please use another LOCAL terminal!
#If you have Linux or Mac OS X local machine, use the following command
ssh -l <your_account> -f -N <server_name>  -LYOUR_UNIQUE_PORT_NUMBER:localhost:YOUR_UNIQUE_PORT_NUMBER

On Windows you can use putty and setup ssh tunnel in the following way: putty.pdf

  • Open your local browser with the following web address:
http://localhost:YOUR_UNIQUE_PORT_NUMBER

On ubuntu workstation

  • Select the directory were you WPG will located
cd <your_working_directory>
  • Download and build library
#Download WPG-package
wget http://github.com/samoylv/WPG/archive/master.zip

#Extract package
unzip master.zip

#Change the directory
cd WPG-master

# Build library. This will download and build FFTW2 and SRW
make all
  • Run web interface.
cd samples
ipython notebook --pylab=inline

For visualization and browsing HDF5 files.

Please download HDFVeiw tool from http://www.hdfgroup.org/hdf-java-html/hdfview/

If you have SRW already installed

Just copy srwlpy.so in wpg folder