Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker/**/*
docker
3 changes: 3 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Note: to avoid the hassles of compiling Viewpoints for modern platforms, there is now a version which runs in a Docker container. See docker/DOCKER_INSTALL.


Step 0

on Mac OS X systems, and perhaps others, optionally put the
Expand Down
35 changes: 35 additions & 0 deletions blitz-patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff -u /home/dgirshovich/viewpoints/blitz-0.10/blitz/bzdebug.h /home/dgirshovich/viewpoints/blitz-0.10/blitz/bzdebug-new.h
--- blitz-0.10/blitz/bzdebug.h 2012-05-11 13:11:13.000000000 -0700
+++ blitz-0.10/blitz/bzdebug-new.h 2017-11-29 10:14:31.459872606 -0800
@@ -117,15 +117,15 @@
}
}

- #define BZASSERT(X) checkAssert(X, __FILE__, __LINE__)
- #define BZPRECONDITION(X) checkAssert(X, __FILE__, __LINE__)
- #define BZPOSTCONDITION(X) checkAssert(X, __FILE__, __LINE__)
- #define BZSTATECHECK(X,Y) checkAssert(X == Y, __FILE__, __LINE__)
+ #define BZASSERT(X) blitz::checkAssert(X, __FILE__, __LINE__)
+ #define BZPRECONDITION(X) blitz::checkAssert(X, __FILE__, __LINE__)
+ #define BZPOSTCONDITION(X) blitz::checkAssert(X, __FILE__, __LINE__)
+ #define BZSTATECHECK(X,Y) blitz::checkAssert(X == Y, __FILE__, __LINE__)
#define BZPRECHECK(X,Y) \
{ \
if ((assertFailMode == false) && (!(X))) \
BZ_STD_SCOPE(cerr) << Y << BZ_STD_SCOPE(endl); \
- checkAssert(X, __FILE__, __LINE__); \
+ blitz::checkAssert(X, __FILE__, __LINE__); \
}

#define BZ_DEBUG_MESSAGE(X) \
@@ -138,7 +138,7 @@
}

#define BZ_DEBUG_PARAM(X) X
- #define BZ_PRE_FAIL checkAssert(0)
+ #define BZ_PRE_FAIL blitz::checkAssert(0)
#define BZ_ASM_DEBUG_MARKER

#elif defined(BZ_DEBUG)

Diff finished. Wed Nov 29 10:14:42 2017
19 changes: 19 additions & 0 deletions docker/DOCKER_INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Step 0: Install Docker CE for your platform if you don't already have it: https://www.docker.com/get-docker


Step 1: Build the Viewpoints docker image. Run:

> docker build -f docker/Dockerfile -t viewpoints .

from the base project directory. This will likely take several minutes the first time. If you change the source, be sure to re-run this command for your changes to be reflected in the Docker image.


Step 2: Run Viewpoints, swapping "./docker_vp.sh" for "./vp". You can pass any arguments accepted by vp. For example:

> ./docker_vp.sh --help # Prints help message in container, then quits.

> ./docker_vp.sh -d , inline_skating.csv # Opens Viewpoints with example dataset in the container.



Exiting Viewpoints will automatically exit the container.
91 changes: 91 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
FROM ubuntu:14.04

RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*

RUN useradd --create-home --shell /bin/bash docker
RUN echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

WORKDIR /home/docker/
USER docker:docker


RUN sudo apt-get update && sudo apt-get install -y \
wget \
build-essential \
git \
libfltk1.3-dev \
libfltk1.3 \
libblitz0-dev \
libblitz0ldbl \
libgsl0-dev \
libccfits-dev \
libboost-all-dev \
libx11-dev \
libxft-dev \
subversion


RUN wget -O fltk-1.3.0-source.tar.gz http://fltk.org/pub/fltk/1.3.0/fltk-1.3.0-source.tar.gz
RUN tar -xzvf fltk-1.3.0-source.tar.gz
WORKDIR fltk-1.3.0
RUN ./configure
RUN make -j9
RUN sudo make install


WORKDIR /home/docker/

RUN git clone https://github.com/proyZ/FL_Flews.git
RUN ln -s FL_Flews flews-0.3.1
WORKDIR flews-0.3.1
RUN ./configure
RUN make -j9


WORKDIR /home/docker/


RUN wget -O blitz-0.10.tar.gz https://astuteinternet.dl.sourceforge.net/project/blitz/blitz/Blitz%2B%2B%200.10/blitz-0.10.tar.gz
RUN tar -xzvf blitz-0.10.tar.gz
WORKDIR blitz-0.10
COPY blitz-patch.patch .
RUN patch -p1 < blitz-patch.patch
RUN ./configure --disable-shared
RUN make -j9 lib
RUN make -j9 check-testsuite # (see if all tests pass)
RUN sudo make install # (you can ignore errors pertaining to .pdf files and .tex files)


WORKDIR /home/docker/


RUN wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.4.tar.gz
RUN tar -xzvf gsl-2.4.tar.gz
WORKDIR gsl-2.4
RUN ./configure --disable-shared
RUN make -j9
RUN make -j9 check # (see if all tests pass)
RUN sudo make install


WORKDIR /home/docker/


RUN wget -O cfitsio3420.tar.gz http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3420.tar.gz
RUN tar -xzvf cfitsio3420.tar.gz
WORKDIR cfitsio
RUN ./configure
RUN make -j9
RUN sudo make install


WORKDIR /home/docker/

COPY . /home/docker/viewpoints
WORKDIR /home/docker/viewpoints

RUN sudo make

ENTRYPOINT ["./vp"]

CMD ["inline_skating.csv"]
4 changes: 4 additions & 0 deletions docker_vp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -ex

docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix viewpoints "$@"
Loading