Graph-tool with Docker

Tiago,

I downloaded the docker image with GT and although it does work fine it does
not seem to have apt-get installed. So I tried to create my own docker image
based on Ubuntu 16.04 by compiling GT. The compilation works fine, until it
reaches file "graph_tree_cts.lo" and then it fails miserably.

Any idea why this is happening? Alternatively, would it be easy to post the
Dockerfile that you used for creating your image, so we can use that as a
basis for our own custom version?

Please see below the Dockerfile I used, as well as the error message from
the compilation process.

Thanks as always!

I downloaded the docker image with GT and although it does work fine it does
not seem to have apt-get installed.

It is based on Arch (which uses pacman), not Debian/Ubuntu (which uses apt-get).

So I tried to create my own docker image
based on Ubuntu 16.04 by compiling GT.

Why would you do that, instead of using the available Ubuntu packages?

The compilation works fine, until it
reaches file "graph_tree_cts.lo" and then it fails miserably.

Any idea why this is happening?

The problem is a bug in the cairomm Ubuntu package that forces the
activation of C++11, when graph-tool needs C++14:

Cairomm CPP flags: -std=c++11 -I/usr/include/cairomm-1.0
-I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/cairo
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include
Cairomm LD flags: -lcairomm-1.0 -lcairo -lsigc-2.0

You need to pass the following to the configure script:

CAIROMM_CFLAGS="-I/usr/include/cairomm-1.0
-I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/cairo
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include"

Alternatively, would it be easy to post the
Dockerfile that you used for creating your image, so we can use that as a
basis for our own custom version?

I've put a link to it in the documentation.

Best,
Tiago

So the docker file is not in the source code git repo or in the
documentation. Can you please just add the "Dockerfile" to the main repo.
Thanks bunch!

~Matt

No, this is distribution related stuff, and does not belong to the main
repository.

As I already mentioned, I already put a link to it in the wiki:

https://git.skewed.de/count0/graph-tool/wikis/Installation-instructions

So that is to pull the docket image. I would like the source to the
original Dockerfile which is not included on that wiki page

attachment.html (4.17 KB)

Yes it is, just read it.

Here is the link for you:

    https://git.skewed.de/count0/graph-tool/uploads/00c2a28d546e72589c83f163127cf3a7/Dockerfile

thanks a lot!

attachment.html (4.18 KB)

Matt,

Here is another Dockerfile, if you need to have Graphtool on Ubuntu.

Regards,

Vaggelis

FROM ubuntu:xenial

RUN apt-get update

USER root

RUN echo "deb http://downloads.skewed.de/apt/xenial xenial universe" >>
/etc/apt/sources.list

RUN echo "deb-src http://downloads.skewed.de/apt/xenial xenial universe" >>
/etc/apt/sources.list

RUN apt-get update

RUN apt-key adv --keyserver pgp.skewed.de --recv-key 612DEFB798507F25

RUN apt-key list

RUN cat /etc/apt/sources.list

RUN apt-get update

RUN apt-get -y --allow-unauthenticated install python3-graph-tool

RUN apt-get -y --allow-unauthenticated install python3-pip

RUN pip3 install pandas

RUN pip3 install pyproj

RUN pip3 install mpmath

RUN pip3 install cffi

RUN pip3 install cairocffi

RUN apt-get -y install libcanberra-gtk3-module

attachment.html (4.4 KB)