Skip to content

Commit

Permalink
first attempt at graph_tool docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Jun 26, 2023
1 parent d553c37 commit c1a4460
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker/build_graph_tool
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -ex

HERE=$(dirname $0)
. $HERE/graph_tool_common

docker build --pull \
--tag $GRAPH_TOOL_TAG_SHA \
-f docker/graphTool.Dockerfile \
$PACKAGE_ROOT
55 changes: 55 additions & 0 deletions docker/graphTool.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM python:3.10

RUN apt-get update

# NB These steps follow the same order as the listed requirements for manual compilation detailed here:
# https://git.skewed.de/count0/graph-tool/-/wikis/installation-instructions#manual-compilation

# Install C++ compiler
RUN apt-get install -y --no-install-recommends build-essential

# Install Boost dev tools
# TODO: Try replacing libboost-all-dev with just the ones required, as included in debian dockerfile
RUN apt-get install -y --no-install-recommends g++ python3-dev autotools-dev libicu-dev libbz2-dev libboost-all-dev

RUN apt-get install -y --no-install-recommends libexpat1-dev

RUN apt-get install -y --no-install-recommends python3-scipy

RUN pip3 install numpy

RUN apt-get install -y --no-install-recommends libcgal-dev

RUN apt-get install -y --no-install-recommends libsparsehash-dev

# graph drawing - not including graphviz
RUN apt-get install -y --no-install-recommends \
gir1.2-gtk-3.0 \
libcairomm-1.0-dev \
python3-cairo-dev \
python3-cairo \
python3-matplotlib

RUN pip3 install pycairo

# so we can generate configure script
RUN apt-get install -y --no-install-recommends autoconf

# get and build source, and install to default Python location
RUN git clone https://git.skewed.de/count0/graph-tool.git
WORKDIR /graph-tool
RUN ./autogen.sh
RUN ./configure
RUN make
RUN make install











7 changes: 7 additions & 0 deletions docker/graph_tool_common
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
. $HERE/common

GRAPH_TOOL_IMAGE_NAME=graphtool

GRAPH_TOOL_TAG_SHA="${PACKAGE_ORG}/${GRAPH_TOOL_IMAGE_NAME}:${GIT_SHA}"
GRAPH_TOOL_TAG_BRANCH="${PACKAGE_ORG}/${GRAPH_TOOL_IMAGE_NAME}:${GIT_BRANCH}"
GRAPH_TOOL_TAG_LATEST="${PACKAGE_ORG}/${GRAPH_TOOL_IMAGE_NAME}:latest"
12 changes: 12 additions & 0 deletions docker/test_graph_tool
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -ex

HERE=$(dirname $0)
. $HERE/graph_tool_common

NAME=graph_tool_test

## Just check that we can bring up the container
docker run -it --name=$NAME $GRAPH_TOOL_TAG_SHA

docker rm $NAME

0 comments on commit c1a4460

Please sign in to comment.