From ac94f3789f04e661518b4af89fa1cacb3e6563c5 Mon Sep 17 00:00:00 2001 From: Jim Rybarski Date: Mon, 24 Aug 2015 23:17:47 -0500 Subject: [PATCH] resolves #73: it's now much easier to do functional testing via docker --- Dockerfile | 5 +++++ Makefile | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0334d55..7e9a453 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,12 +16,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python-pip \ python3-pip \ libfreetype6-dev \ + python-numpy \ + python3-numpy \ python3-matplotlib \ libfreetype6-dev \ libpng-dev \ libjpeg-dev \ pkg-config \ python3-skimage \ + tk \ + tk-dev \ + python3-tk \ && pip3 install -U cython \ scikit-image \ && rm -rf /var/lib/apt/lists/* diff --git a/Makefile b/Makefile index c5d8cb6..7906c9d 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ info: @echo "Available Make Commands" @echo "" @echo "build: builds the image" - @echo "py2: mounts ~/Documents/nd2s to /var/nd2s and runs a Python 2.7 interpreter" - @echo "py3: mounts ~/Documents/nd2s to /var/nd2s and runs a Python 3.4 interpreter" + @echo "py2: maps ~/Documents/nd2s to /var/nd2s and runs a Python 2.7 interpreter" + @echo "py3: maps ~/Documents/nd2s to /var/nd2s and runs a Python 3.4 interpreter" @echo "test: runs all unit tests (in Python 3.4)" @echo "" @@ -14,13 +14,13 @@ build: docker build -t jimrybarski/nd2reader . shell: - docker run --rm -v ~/Documents/nd2s:/var/nd2s -it jimrybarski/nd2reader bash + xhost local:root; docker run --rm -v ~/Documents/nd2s:/var/nd2s -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$(DISPLAY) -it jimrybarski/nd2reader bash py2: - docker run --rm -v ~/Documents/nd2s:/var/nd2s -it jimrybarski/nd2reader python2.7 + xhost local:root; docker run --rm -v ~/Documents/nd2s:/var/nd2s -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$(DISPLAY) -it jimrybarski/nd2reader python2.7 py3: - docker run --rm -v ~/Documents/nd2s:/var/nd2s -it jimrybarski/nd2reader python3.4 + xhost local:root; docker run --rm -v ~/Documents/nd2s:/var/nd2s -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$(DISPLAY) -it jimrybarski/nd2reader python3.4 test: build docker run --rm -it jimrybarski/nd2reader python3.4 /opt/nd2reader/tests.py