Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HazenBabcock committed Nov 26, 2016
1 parent f0fbce3 commit bd29bbd
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 0 deletions.
43 changes: 43 additions & 0 deletions plplot/debian_latest_python27/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Distro
FROM debian:latest
MAINTAINER Hazen Babcock <[email protected]>

# Update sources
RUN apt update

# Get dependencies
RUN apt --yes install cmake
RUN apt --yes install gcc
RUN apt --yes install git
RUN apt --yes install libqhull-dev
RUN apt --yes install libshp-dev
RUN apt --yes install swig

RUN apt --yes install python2.7
RUN apt --yes install python-dev
RUN apt --yes install python-pip

# Set working directory
WORKDIR /plplot

# Get PLplot
RUN git clone git://git.code.sf.net/p/plplot/plplot plplot
RUN mkdir plplot-build

# Create configure python
RUN pip install virtualenv
RUN virtualenv -p /usr/bin/python2 venv
RUN . venv/bin/activate
RUN pip install numpy

# Copy in the test shell script
COPY ./test_plplot.sh ./

# Record when this image was made
RUN date > image_date.txt

# Volume for testing a local repo
VOLUME ["/plplot_repo"]

# This is what what gets run when this is started.
CMD sh test_plplot.sh
32 changes: 32 additions & 0 deletions plplot/debian_latest_python27/test_plplot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Note that all the files that are generated will disappear as soon
# as this stops running so we'll capture everything by redirecting
# the output to a file.
#
if test "$(ls -A /plplot_repo)"; then
# Use local volume if available.
echo "<!-- using local repo -->"
cd plplot-build
echo "<!-- cmake -->"
cmake /plplot_repo -DBUILD_TEST=ON -DENABLE_tk=OFF
else
# Move to source directory & update source.
echo "<!-- using SF repo -->"
cd plplot
pwd
git fetch origin
git merge origin/master
cd ../plplot-build
pwd
echo "<!-- cmake -->"
cmake ../plplot -DBUILD_TEST=ON -DENABLE_tk=OFF
fi

# Build and test.
echo "<!-- cache -->"
more CMakeCache.txt
echo "<!-- make -->"
make VERBOSE=1
echo "<!-- ctest -->"
ctest --verbose
echo "<!-- done -->"
43 changes: 43 additions & 0 deletions plplot/debian_latest_python34/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Distro
FROM debian:latest
MAINTAINER Hazen Babcock <[email protected]>

# Update sources
RUN apt update

# Get dependencies
RUN apt --yes install cmake
RUN apt --yes install gcc
RUN apt --yes install git
RUN apt --yes install libqhull-dev
RUN apt --yes install libshp-dev
RUN apt --yes install swig

RUN apt --yes install python3.4
RUN apt --yes install python3-dev
RUN apt --yes install python3-pip

# Set working directory
WORKDIR /plplot

# Get PLplot
RUN git clone git://git.code.sf.net/p/plplot/plplot plplot
RUN mkdir plplot-build

# Create configure python
RUN pip3 install virtualenv
RUN virtualenv -p /usr/bin/python3 venv
RUN . venv/bin/activate
RUN pip3 install numpy

# Copy in the test shell script
COPY ./test_plplot.sh ./

# Record when this image was made
RUN date > image_date.txt

# Volume for testing a local repo
VOLUME ["/plplot_repo"]

# This is what what gets run when this is started.
CMD sh test_plplot.sh
32 changes: 32 additions & 0 deletions plplot/debian_latest_python34/test_plplot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Note that all the files that are generated will disappear as soon
# as this stops running so we'll capture everything by redirecting
# the output to a file.
#
if test "$(ls -A /plplot_repo)"; then
# Use local volume if available.
echo "<!-- using local repo -->"
cd plplot-build
echo "<!-- cmake -->"
cmake /plplot_repo -DBUILD_TEST=ON -DENABLE_tk=OFF
else
# Move to source directory & update source.
echo "<!-- using SF repo -->"
cd plplot
pwd
git fetch origin
git merge origin/master
cd ../plplot-build
pwd
echo "<!-- cmake -->"
cmake ../plplot -DBUILD_TEST=ON -DENABLE_tk=OFF
fi

# Build and test.
echo "<!-- cache -->"
more CMakeCache.txt
echo "<!-- make -->"
make VERBOSE=1
echo "<!-- ctest -->"
ctest --verbose
echo "<!-- done -->"

0 comments on commit bd29bbd

Please sign in to comment.