Installing CellProfiler2 on CentOS 6.4 cluster


#1

(I moved this post from general to CPCluster)
Hi,

As a researcher I want to analyze thens of thousands of images using CellProfiler2. For this purpose I am trying to install CellProfiler on our CentOS 6.4 linux cluster using the latest source as provided on github (codeload.github.com/CellProfile … zip/master version 0.2.2). Unfortunately I can not get CellProfiler to build despite reading multiple posts on this forum on building CellProfiler on a Linux cluster and having multiple efforts to do so. A command line interface (CLI) to CellProfiler would be sufficient.

Is there a makefile around to build CellProfiler on CentOS 6.4? If not, where do I start to get this beast running? As I am a user I have no administrator rights on the CentOS 6.4 Linux Cluster. The administrator of the CentOS system is willing to install some basic packages for me if needed, but for now let’s assume I have to use my own home directory to install the sources.

The source I downloaded contains multiple makefiles for different systems. Here I will show the result of multiple makefiles. This is what I have done so far.

Java is installed

$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.13) (rhel-1.65.1.11.13.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

GCC is installed

$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 Free Software Foundation, Inc.

Makefile.CP2.standard.64

# set variables
PREFIX="$HOME/CellProfiler2"
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
export LD_LIBRARY_PATH=/hpc/local/CentOS6/dhl_ec/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib64/pkgconfig/glib-2.0.pc:/hpc/local/CentOS6/dhl_ec/lib

# make
# first, the make file (any makefile) gives an error:
# "Could not detect HOSTTYPE variable. Please export HOSTTYPE from"
# therefor I set the HOSTTYPE again, just before executing make
HOSTTYPE=$HOSTTYPE make -f Makefile.CP2.standard.64 PREFIX="$PREFIX" SRCDIR="$PREFIX"/src

Output Makefile.CP2.standard.64

[quote]

checking machine type as reported by uname -m… x86_64
checking for --without-gcc… no
checking for gcc… gcc
checking whether the C compiler works… no
configure: error: in /home/dhl_ec/bnelissen/src/CellProfiler-source/tmp/Python-2.7.2': configure: error: C compiler cannot create executables Seeconfig.log’ for more details
make: *** [/home/dhl_ec/bnelissen/CellProfiler2/bin/python] Error 77[/quote]

Makefile.CP2.centos5.64

# set variables
PREFIX="$HOME/CellProfiler2"
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
export LD_LIBRARY_PATH=/hpc/local/CentOS6/dhl_ec/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib64/pkgconfig/glib-2.0.pc:/hpc/local/CentOS6/dhl_ec/lib

# make
# first, the make file (any makefile) gives an error:
# "Could not detect HOSTTYPE variable. Please export HOSTTYPE from"
# therefor I set the HOSTTYPE again, just before executing make
HOSTTYPE=$HOSTTYPE make -f Makefile.CP2.centos5.64 PREFIX="$PREFIX" SRCDIR="$PREFIX"/src

Output Makefile.CP2.centos5.64

Makefile.CP2.standard.64.repoqt

# set variables
PREFIX="$HOME/CellProfiler2"
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
export LD_LIBRARY_PATH=/hpc/local/CentOS6/dhl_ec/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib64/pkgconfig/glib-2.0.pc:/hpc/local/CentOS6/dhl_ec/lib

# zlib can not be found using the default 'Makefile.CP2.standard.64.repoqt' makefile below
# I editted Makefile.CP2.standard.64.repoqt and changed the zlib part on line 1369 to:

# $(SRCDIR)/$(ZLIBVERSION).tar.bz2:
#                mkdir -p "$(SRCDIR)" && cd "$(SRCDIR)" && \
#                wget $(WGETFLAGS) "http://optimate.dl.sourceforge.net/project/libpng/zlib/1.2.7/zlib-1.2.7.tar.bz2" && \
#                touch "$@"

# make
# first, the make file (any makefile) gives an error:
# *"Could not detect HOSTTYPE variable. Please export HOSTTYPE from"*
# therefor I set the HOSTTYPE again, just before executing make
HOSTTYPE=$HOSTTYPE make -f Makefile.CP2.standard.64.repoqt PREFIX="$PREFIX" SRCDIR="$PREFIX"/src

Output Makefile.CP2.standard.64.repoqt

As you can see, the different make files are running into different problems. After trying to install dependencies and fixing sources for quite a while I felt it was time to ask the experts. Can you help me build CellProfiler2 on CentOS 6.4?

Thanks in advance.


#2

Hi,

We are working on builds for various Linux flavors, as you may have read. I have forwarded this to our Linux developers who would have better advice for you. Stay tuned…

Thanks,
David


#3

Sorry about the mess of different makefiles. The one that is called Makefile.CP2.standard.64 should work for CentOS 6. Can you please look in the file config.log? I think you should find it under /home/dhl_ec/bnelissen/src/CellProfiler-source/tmp/Python-2.7.2.

Are you about to actually use the C compiler for other things? For instance, try the following:

[code]$ cat > a.c
#include <stdio.h>

int main()
{
printf(“Foo\n”);
}
gcc a.c ./a.out
Foo
[/code]

I am working on binary CellProfiler packages (RPMs) for CentOS 6. They will install CellProfiler, as well as the dependencies that CentOS 6 does not have, under /usr/cellprofiler. It may perhaps be of interest to you, if your admins are willing. I expect to have the packages ready in a week or two.


#4

Hi ljosa,

your c code compiles and runs fine. Ill get in touch with my admin and I am sure he is willing to help me out.

Thanks in advance, and when I can be of any assistance just let me know.

sincerely,
Bas


#5

Hi,

Any luck on the rpm builds? I will never be able to install any non-official sources outside my home directory. My hope is that I can build CP2 inside my homefolder.

Thanks.


#6

so. I have CellProfiler 2.1 beta running on the CentOS cluster without the use of admin rights.

This is (in short) what I did:

  • download all the rpms on a local (virtual) machine
  • install all the rpms using --nodeps --prefix=… in, let’s say, /tmp/cellprofiler
  • change the /tmp/cellprofiler/bin/cellprofiler boot script to:

[code]#!/bin/sh

Wrapper script used to start CellProfiler on CentOS 6.4

prefix=/tmp/cellprofiler

export LD_LIBRARY_PATH="$prefix/jdk/jre/lib/amd64/server:$prefix/lib:$prefix/lib/wxPython-2.8.11.0-gtk2-unicode/lib:$LD_LIBRARY_PATH"
export PATH=$prefix/bin:$prefix/jdk/bin:$PATH
cd $prefix/src/CellProfiler
prefix/bin/python CellProfiler.py "@"
[/code]

  • now you can copy this folder to your cluster and run it from anywhere, just set the prefix in bin/cellprofiler to its proper path

good luck.

ps. sorry, but negative kudo’s to the guy who made the previous version of bin/cellprofiler and resets the LD_LIBRARY_PATH variable (why?)