Skip to content

Commit

Permalink
Merge pull request #1667 from obspy/docker_add_debian_stretch
Browse files Browse the repository at this point in the history
Debian stretch / Ubuntu Zesty 17.04
  • Loading branch information
megies committed May 11, 2017
2 parents a203b5a + 46ca3c5 commit 85167d0
Show file tree
Hide file tree
Showing 23 changed files with 973 additions and 162 deletions.
8 changes: 5 additions & 3 deletions debian/pybuild/control
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ X-Python-Version: >= 2.7
X-Python3-Version: >= 3.2
Build-Depends: debhelper (>= 5),
python (>= 2.7), python-dev (>= 2.7), python3-all-dev,
python-support (>= 0.7.1), dh-python, python-numpy, python3-numpy,
dh-python, python-numpy, python3-numpy,
python-setuptools (>=0.6.21), python3-setuptools, gcc, help2man,
quilt, python-future (>= 0.12.4), python3-future (>= 0.12.4)
Standards-Version: 3.9.3
Expand Down Expand Up @@ -40,7 +40,8 @@ Replaces: python-obspy-arclink, python-obspy-core, python-obspy-datamark,
python-obspy-wav, python-obspy-xseed
Recommends: python-obspy-dbg (= ${binary:Version}),
python-mpltoolkits.basemap, python-geographiclib, python-imaging,
python-nose, python-flake8, python-mock, python-gdal
python-nose, python-flake8, python-mock, python-gdal,
python-cryptography, python-m2crypto
Suggests: python-mlpy, python-pyproj, ipython
Description: ObsPy: A Python Toolbox for seismology
ObsPy is an open-source project dedicated to provide a Python framework for
Expand All @@ -64,7 +65,8 @@ Depends: python3 (>= 3.2),
python3-future (>= 0.12.4), python3-decorator, python3-requests
Recommends: python-obspy-dbg (= ${binary:Version}),
python3-mpltoolkits.basemap, python3-geographiclib,
python3-imaging, python3-nose, python3-flake8, python3-mock, python3-gdal
python3-imaging, python3-nose, python3-flake8, python3-mock, python3-gdal,
python3-cryptography
Suggests: python3-pyproj, ipython3, ipython3-notebook
Description: ObsPy: A Python Toolbox for seismology
ObsPy is an open-source project dedicated to provide a Python framework for
Expand Down
2 changes: 1 addition & 1 deletion debian/python_distutils/control
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Replaces: python-obspy-arclink, python-obspy-core, python-obspy-datamark,
python-obspy-wav, python-obspy-xseed
Recommends: python-obspy-dbg (= ${binary:Version}),
python-geographiclib, python-nose, python-flake8, python-imaging, python-mock,
python-mpltoolkits.basemap, python-gdal
python-mpltoolkits.basemap, python-gdal, python-m2crypto
Suggests: python-mlpy, python-pyproj, ipython
Description: ObsPy: A Python Toolbox for seismology seismological observatories
ObsPy is an open-source project dedicated to provide a Python framework for
Expand Down
7 changes: 1 addition & 6 deletions misc/debian/deb__build_debs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ git clean -fxd
# first of all selectively use debian build instructions for either
# buildsystem=python_distutils (older Debuntu releases) or buildsystem=pybuild
# (newer Debuntu releases)
if [ "$CODENAME" == "wheezy" ] || [ "$CODENAME" == "precise" ]
if [ "$CODENAME" == "wheezy" ]
then
# old build style, python2 only
cp -a debian/python_distutils/* debian/
Expand Down Expand Up @@ -104,11 +104,6 @@ cat >> debian/changelog << EOF
-- ObsPy Development Team <devs@obspy.org> $DATE
EOF
# adjust dh compatibility for older dh versions
if [ $CODENAME = "squeeze" ]
then
echo "8" > ./debian/compat
fi
# build the package
export FFLAGS="$FFLAGS -fPIC" # needed for gfortran
export LDFLAGS="$LDFLAGS -shared -z relro -z now" # needed for gfortran
Expand Down
12 changes: 12 additions & 0 deletions misc/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ $ docker login # docker hub user needs write access to "obspy/base-images" of o
$ docker push obspy/base-images:${DISTRO_FULL}
```

To create a Raspbian (Debian ``armhf`` for Raspberry Pi) docker base image (using ``qemu``, https://wiki.debian.org/ArmHardFloatChroot):

```bash
$ cd /tmp
$ DISTRO=jessie
$ DISTRO_FULL=debian_8_jessie_armhf
$ sudo qemu-debootstrap --arch=armhf ${DISTRO} ${DISTRO_FULL} ftp://ftp.debian.org/debian/ 2>&1 | tee ${DISTRO_FULL}.debootstrap.log
$ sudo tar -C ${DISTRO_FULL} -c . | docker import - obspy/base-images:${DISTRO_FULL}
$ docker login # docker hub user needs write access to "obspy/base-images" of organization "obspy"
$ docker push obspy/base-images:${DISTRO_FULL}
```

### Setting up `docker-testbot` to automatically test PRs and branches and send commit statuses

##### Install docker
Expand Down
66 changes: 45 additions & 21 deletions misc/docker/base_images/debian_7_wheezy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,57 @@
FROM debian:wheezy

MAINTAINER Lion Krischer
MAINTAINER Tobias Megies

# Set the env variables to non-interactive
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_PRIORITY critical
ENV DEBCONF_NOWARNINGS yes
ENV DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical DEBCONF_NOWARNINGS=yes

# installation for running tests in docker image
# Can fail on occasion.
RUN apt-get update && apt-get upgrade -y || true
RUN apt-get -y install python-numpy python-scipy python-matplotlib python-sqlalchemy python-lxml python-mock python-mpltoolkits.basemap python-mpltoolkits.basemap-data python-pip ttf-bitstream-vera python-decorator python-requests
# install packages to install obspy and build deb packages
RUN apt-get update && apt-get upgrade -y
RUN apt-get update && apt-get -y --no-install-recommends install \
debhelper \
devscripts \
equivs \
fakeroot \
gcc \
git \
help2man \
lintian \
locales \
lsb-release \
python \
python-decorator \
python-dev \
python-gdal \
python-geographiclib \
python-imaging \
python-jsonschema \
python-lxml \
python-matplotlib \
python-m2crypto \
python-mock \
python-mpltoolkits.basemap \
python-mpltoolkits.basemap-data \
python-nose \
python-numpy \
python-pip \
python-pyproj \
python-requests \
python-scipy \
python-setuptools \
python-sqlalchemy \
python-support \
python-tornado \
quilt \
ttf-bitstream-vera \
vim \
&& rm -rf /var/lib/apt/lists/*
# install some additional packages via pip
RUN pip install future
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip
RUN echo "backend: agg" > /etc/matplotlibrc

# additional installation for building deb packages in docker image
RUN apt-get install -y locales
# make sure locale we use in tests is present
RUN locale-gen en_US.UTF-8
RUN apt-get install -y python
RUN apt-get install -y python python-dev python-setuptools python-support python-numpy lsb-release gcc
RUN apt-get install -y vim git fakeroot equivs lintian help2man quilt git
RUN apt-get install -y ttf-bitstream-vera
RUN apt-get install -y python-matplotlib python-numpy python-scipy python-lxml python-sqlalchemy python-nose python-setuptools python-imaging python-mock python-decorator python-requests python-tornado python-geographiclib
RUN apt-get install -y debhelper python-all devscripts
RUN echo "backend: agg" > /etc/matplotlibrc

# install fake future packages, so that we can properly install built obspy deb
# packages to test them (we install future via pip)
RUN cd /tmp && echo "Package: python-future" > python-future.control && equivs-build python-future.control && dpkg -i python-future_*.deb
# debian package for obspy 1.0.2 still have suds listed as dependency
# for now mock install it, can be removed when 1.0.3 is released
RUN cd /tmp && echo "Package: python-suds" > python-suds.control && equivs-build python-suds.control && dpkg -i python-suds_*.deb
11 changes: 6 additions & 5 deletions misc/docker/base_images/debian_7_wheezy_32bit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MAINTAINER Tobias Megies
ENV DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical DEBCONF_NOWARNINGS=yes

# install packages to install obspy and build deb packages
RUN apt-get update && apt-get upgrade -y || true
RUN apt-get update && apt-get upgrade -y
RUN apt-get update && apt-get -y --no-install-recommends install \
debhelper \
devscripts \
Expand All @@ -21,16 +21,20 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
python \
python-decorator \
python-dev \
python-gdal \
python-geographiclib \
python-imaging \
python-jsonschema \
python-lxml \
python-matplotlib \
python-m2crypto \
python-mock \
python-mpltoolkits.basemap \
python-mpltoolkits.basemap-data \
python-nose \
python-numpy \
python-pip \
python-pyproj \
python-requests \
python-scipy \
python-setuptools \
Expand All @@ -43,14 +47,11 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
&& rm -rf /var/lib/apt/lists/*
# install some additional packages via pip
RUN pip install future
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip || true
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip
# make sure locale we use in tests is present
RUN locale-gen en_US.UTF-8
RUN echo "backend: agg" > /etc/matplotlibrc

# install fake future packages, so that we can properly install built obspy deb
# packages to test them (we install future via pip)
RUN cd /tmp && echo "Package: python-future" > python-future.control && equivs-build python-future.control && dpkg -i python-future_*.deb
# debian package for obspy 1.0.2 still have suds listed as dependency
# for now mock install it, can be removed when 1.0.3 is released
RUN cd /tmp && echo "Package: python-suds" > python-suds.control && equivs-build python-suds.control && dpkg -i python-suds_*.deb
57 changes: 57 additions & 0 deletions misc/docker/base_images/debian_7_wheezy_armhf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM obspy/base-images:debian_7_wheezy_armhf

MAINTAINER Tobias Megies

# Set the env variables to non-interactive
ENV DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical DEBCONF_NOWARNINGS=yes

# install packages to install obspy and build deb packages
RUN apt-get update && apt-get upgrade -y
RUN apt-get update && apt-get -y --no-install-recommends install \
debhelper \
devscripts \
equivs \
fakeroot \
gcc \
git \
help2man \
lintian \
locales \
lsb-release \
python \
python-decorator \
python-dev \
python-gdal \
python-geographiclib \
python-imaging \
python-jsonschema \
python-lxml \
python-matplotlib \
python-m2crypto \
python-mock \
python-mpltoolkits.basemap \
python-mpltoolkits.basemap-data \
python-nose \
python-numpy \
python-pip \
python-pyproj \
python-requests \
python-scipy \
python-setuptools \
python-sqlalchemy \
python-support \
python-tornado \
quilt \
ttf-bitstream-vera \
vim \
&& rm -rf /var/lib/apt/lists/*
# install some additional packages via pip
RUN pip install future
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip
# make sure locale we use in tests is present
RUN locale-gen en_US.UTF-8
RUN echo "backend: agg" > /etc/matplotlibrc

# install fake future packages, so that we can properly install built obspy deb
# packages to test them (we install future via pip)
RUN cd /tmp && echo "Package: python-future" > python-future.control && equivs-build python-future.control && dpkg -i python-future_*.deb
95 changes: 68 additions & 27 deletions misc/docker/base_images/debian_8_jessie/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,77 @@
FROM debian:jessie

MAINTAINER Lion Krischer
MAINTAINER Tobias Megies

# Set the env variables to non-interactive
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_PRIORITY critical
ENV DEBCONF_NOWARNINGS yes
ENV DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical DEBCONF_NOWARNINGS=yes

# installation for running tests in docker image
# Can fail on occasion.
RUN apt-get update && apt-get upgrade -y || true
RUN apt-get -y install python-numpy python-scipy python-matplotlib python-sqlalchemy python-lxml python-mock python-mpltoolkits.basemap python-mpltoolkits.basemap-data python-pip python-tornado ttf-bitstream-vera python-decorator python-requests
RUN pip install future
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip

# additional installation for building deb packages in docker image
RUN apt-get install -y locales
# install packages to install obspy and build deb packages
RUN apt-get update && apt-get upgrade -y
RUN apt-get update && apt-get -y --no-install-recommends install \
debhelper \
devscripts \
equivs \
fakeroot \
gcc \
git \
help2man \
lintian \
locales \
lsb-release \
python \
python-cryptography \
python-decorator \
python-dev \
python-geographiclib \
python-imaging \
python-jsonschema \
python-lxml \
python-m2crypto \
python-matplotlib \
python-mock \
python-mpltoolkits.basemap \
python-mpltoolkits.basemap-data \
python-nose \
python-numpy \
python-pip \
python-pyproj \
python-requests \
python-scipy \
python-setuptools \
python-sqlalchemy \
python-support \
python-tornado \
python3 \
python3-cryptography \
python3-decorator \
python3-dev \
python3-flake8 \
python3-jsonschema \
python3-lxml \
python3-matplotlib \
python3-mock \
python3-nose \
python3-numpy \
python3-pip \
python3-pyproj \
python3-requests \
python3-scipy \
python3-sqlalchemy \
python3-tornado \
quilt \
ttf-bitstream-vera \
vim \
&& rm -rf /var/lib/apt/lists/*
# install some additional packages via pip
RUN pip install future; \
pip3 install future
RUN pip install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip; \
pip3 install https://github.com/Damgaard/PyImgur/archive/9ebd8bed9b3d0ae2797950876f5c1e64a560f7d8.zip
# make sure locale we use in tests is present
RUN locale-gen en_US.UTF-8
RUN apt-get install -y python
RUN apt-get install -y python python-dev python-setuptools python-support python-numpy lsb-release gcc
RUN apt-get install -y vim git fakeroot equivs lintian help2man quilt git
RUN apt-get install -y ttf-bitstream-vera
RUN apt-get install -y python-matplotlib python-numpy python-scipy python-lxml python-sqlalchemy python-nose python-flake8 python-setuptools python-imaging python-mock python-decorator python-requests python-tornado python-geographiclib
RUN apt-get install -y python3 python3-dev python3-numpy python3-scipy python3-lxml python3-matplotlib python3-sqlalchemy python3-tornado python3-nose python3-mock python3-flake8 python3-decorator python3-requests python3-tornado python3-pip
RUN apt-get install -y debhelper python-all python3-all devscripts
RUN pip3 install future

# install fake future packages, so that we can properly install built obspy deb
# packages to test them (we install future via pip)
RUN cd /tmp && echo "Package: python-future" > python-future.control && equivs-build python-future.control && dpkg -i python-future_*.deb
RUN cd /tmp && echo "Package: python3-future" > python3-future.control && equivs-build python3-future.control && dpkg -i python3-future_*.deb
# debian package for obspy 1.0.2 still have suds listed as dependency
# for now mock install it, can be removed when 1.0.3 is released
RUN cd /tmp && echo "Package: python-suds" > python-suds.control && equivs-build python-suds.control && dpkg -i python-suds_*.deb
RUN cd /tmp && echo "Package: python3-suds" > python3-suds.control && equivs-build python3-suds.control && dpkg -i python3-suds_*.deb
RUN cd /tmp && \
(echo "Package: python-future" > python-future.control && equivs-build python-future.control && dpkg -i python-future_*.deb); \
(echo "Package: python3-future" > python3-future.control && equivs-build python3-future.control && dpkg -i python3-future_*.deb)

0 comments on commit 85167d0

Please sign in to comment.