summaryrefslogtreecommitdiffstats
path: root/taskcluster/docker/debian10-test-iris
diff options
context:
space:
mode:
Diffstat (limited to 'taskcluster/docker/debian10-test-iris')
-rw-r--r--taskcluster/docker/debian10-test-iris/Dockerfile28
-rwxr-xr-xtaskcluster/docker/debian10-test-iris/install_iris_deps.sh90
-rw-r--r--taskcluster/docker/debian10-test-iris/motd5
-rw-r--r--taskcluster/docker/debian10-test-iris/taskcluster-interactive-shell22
4 files changed, 145 insertions, 0 deletions
diff --git a/taskcluster/docker/debian10-test-iris/Dockerfile b/taskcluster/docker/debian10-test-iris/Dockerfile
new file mode 100644
index 0000000000..ef8ec5df77
--- /dev/null
+++ b/taskcluster/docker/debian10-test-iris/Dockerfile
@@ -0,0 +1,28 @@
+FROM $DOCKER_IMAGE_PARENT
+MAINTAINER Wes Kocher <wkocher@mozilla.com>
+
+RUN mkdir -p /builds
+RUN id worker || useradd -d /builds/worker -s /bin/bash -m worker
+WORKDIR /builds/worker
+
+# We need to declare all potentially cache volumes as caches. Also,
+# making high I/O paths volumes increase I/O throughput because of
+# AUFS slowness.
+VOLUME /builds/worker/.cache
+VOLUME /builds/worker/checkouts
+VOLUME /builds/worker/tooltool-cache
+VOLUME /builds/worker/workspace
+
+# %include taskcluster/docker/debian10-test-iris/install_iris_deps.sh
+ADD topsrcdir/taskcluster/docker/debian10-test-iris/install_iris_deps.sh /setup/install_iris_deps.sh
+RUN bash /setup/install_iris_deps.sh
+
+# Set up first-run experience for interactive mode
+ADD motd /etc/taskcluster-motd
+ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
+RUN chmod +x /bin/taskcluster-interactive-shell
+
+RUN chown -R worker:worker /builds/worker
+
+# Set a default command useful for debugging
+CMD ["/bin/bash", "--login"]
diff --git a/taskcluster/docker/debian10-test-iris/install_iris_deps.sh b/taskcluster/docker/debian10-test-iris/install_iris_deps.sh
new file mode 100755
index 0000000000..c1b7152c06
--- /dev/null
+++ b/taskcluster/docker/debian10-test-iris/install_iris_deps.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# This script installs and configures everything the iris
+# testing suite requires.
+#!/usr/bin/env bash
+
+set -ve
+
+apt_packages=()
+
+apt_packages+=('apt-utils')
+apt_packages+=('autoconf')
+apt_packages+=('autoconf-archive')
+apt_packages+=('automake')
+apt_packages+=('fluxbox')
+apt_packages+=('libcairo2-dev')
+apt_packages+=('libgtk2.0-dev')
+apt_packages+=('libicu-dev')
+apt_packages+=('libjpeg62-turbo-dev')
+apt_packages+=('libopencv-contrib-dev')
+apt_packages+=('libopencv-dev')
+apt_packages+=('libopencv-objdetect-dev')
+apt_packages+=('libopencv-superres-dev')
+apt_packages+=('libopencv-videostab-dev')
+apt_packages+=('libpango1.0-dev')
+apt_packages+=('libpng-dev')
+apt_packages+=('libpng16-16')
+apt_packages+=('libtiff5-dev')
+apt_packages+=('libtool')
+apt_packages+=('p7zip-full')
+apt_packages+=('pkg-config')
+apt_packages+=('python3.7-tk')
+apt_packages+=('python3.7-dev')
+apt_packages+=('python3-pip')
+apt_packages+=('scrot')
+apt_packages+=('wmctrl')
+apt_packages+=('xdotool')
+apt_packages+=('xsel')
+apt_packages+=('zlib1g-dev')
+
+apt-get update
+# This allows packages to be installed without human interaction
+export DEBIAN_FRONTEND=noninteractive
+apt-get install -y -f "${apt_packages[@]}"
+
+python3.7 -m pip install pipenv
+python3.7 -m pip install psutil
+python3.7 -m pip install zstandard
+
+mkdir -p /setup
+cd /setup
+
+wget http://www.leptonica.org/source/leptonica-1.76.0.tar.gz
+tar xopf leptonica-1.76.0.tar.gz
+cd leptonica-1.76.0
+./configure && make && make install
+
+cd /setup
+wget https://github.com/tesseract-ocr/tesseract/archive/4.0.0.tar.gz
+tar xopf 4.0.0.tar.gz
+cd tesseract-4.0.0
+./autogen.sh &&\
+./configure --enable-debug &&\
+LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make &&\
+make install &&\
+make install -langs &&\
+ldconfig
+
+cd /setup
+wget https://github.com/tesseract-ocr/tessdata/archive/4.0.0.zip
+unzip 4.0.0.zip
+cd tessdata-4.0.0
+ls /usr/local/share/tessdata/
+mv ./* /usr/local/share/tessdata/
+
+
+cd /
+rm -rf /setup
+rm -rf ~/.ccache
+
+ls ~/.cache
+
+rm -rf ~/.npm
+
+apt-get clean
+apt-get autoclean
+rm -f "$0"
diff --git a/taskcluster/docker/debian10-test-iris/motd b/taskcluster/docker/debian10-test-iris/motd
new file mode 100644
index 0000000000..35017be2a2
--- /dev/null
+++ b/taskcluster/docker/debian10-test-iris/motd
@@ -0,0 +1,5 @@
+Welcome to your taskcluster interactive shell! The regularly scheduled task
+has been paused to give you a chance to set up your debugging environment.
+
+For your convenience, the exact mozharness command needed for this task can
+be invoked using the 'run-mozharness' command.
diff --git a/taskcluster/docker/debian10-test-iris/taskcluster-interactive-shell b/taskcluster/docker/debian10-test-iris/taskcluster-interactive-shell
new file mode 100644
index 0000000000..c782c0ea96
--- /dev/null
+++ b/taskcluster/docker/debian10-test-iris/taskcluster-interactive-shell
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+download() {
+ name=`basename $1`
+ url=${GECKO_HEAD_REPOSITORY}/raw-file/${GECKO_HEAD_REV}/$1
+ if ! curl --fail --silent -o ./$name --retry 10 $url; then
+ fail "failed downloading $1 from ${GECKO_HEAD_REPOSITORY}"
+ fi
+}
+
+cd $HOME/bin;
+download taskcluster/scripts/tester/run-wizard;
+chmod +x run-wizard;
+./run-wizard;
+
+SPAWN="$SHELL";
+if [ "$SHELL" = "bash" ]; then
+ SPAWN="bash -li";
+fi;
+
+cd $HOME;
+exec $SPAWN;