Mercurial > hg > vampy
changeset 106:76badb3a0bb3 vampy-2.1
Add mechanism to build a "standard" Linux .so using Docker
author | Chris Cannam |
---|---|
date | Tue, 05 Feb 2019 12:48:59 +0000 |
parents | d5220acc1403 |
children | c4e00c81a0c7 |
files | .hgignore Dockerfile.in dockerbuild.sh |
diffstat | 3 files changed, 60 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Tue Feb 05 12:48:59 2019 +0000 @@ -0,0 +1,8 @@ +syntax: glob +*~ +*.pyc +*.so +*.orig + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile.in Tue Feb 05 12:48:59 2019 +0000 @@ -0,0 +1,20 @@ +FROM ubuntu:16.04 +MAINTAINER Chris Cannam <cannam@all-day-breakfast.com> +RUN apt-get update && \ + apt-get install -y \ + build-essential \ + libsndfile-dev \ + git \ + mercurial \ + curl wget \ + python libpython2.7-dev python-numpy +RUN apt-cache search python +RUN apt-get clean && rm -rf /var/lib/apt/lists/* +RUN hg clone -r[[REVISION]] https://code.soundsoftware.ac.uk/hg/vampy +RUN hg clone https://code.soundsoftware.ac.uk/hg/vamp-plugin-sdk +WORKDIR vamp-plugin-sdk +RUN ./configure +RUN make -j3 +WORKDIR ../vampy +RUN make -f Makefile.linux +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dockerbuild.sh Tue Feb 05 12:48:59 2019 +0000 @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Docker required! + +set -eu + +current=$(hg id | awk '{ print $1; }') + +case "$current" in + *+) echo "WARNING: Current working copy has been modified - build will check out the last commit, which must perforce be different";; + *);; +esac + +current=${current%%+} + +rm -f vampy.so + +cat Dockerfile.in | perl -p -e 's/\[\[REVISION\]\]/'"$current"'/' > Dockerfile + +dockertag="cannam/vampy-$current" + +sudo docker build -t "$dockertag" -f Dockerfile . + +container=$(sudo docker create "$dockertag") +sudo docker cp "$container":vampy/vampy.so . +sudo docker rm "$container" + +ldd vampy.so +VAMP_PATH=".:./Example VamPy plugins" ../vamp-plugin-sdk/host/vamp-simple-host -l + +echo "Done!" +