Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker & radio astronomy - containing fragile s...

Gijs Molenaar
January 24, 2015

Docker & radio astronomy - containing fragile scientific software

As a scientific software engineer in the field of radio astronomy, I'm involved in creating, improving and maintaining a broad range of tools used by scientists. These tools are used to process and analyse data coming from various radio telescopes, particularly LOFAR (LOw Frequency ARray) and SKA (Square Kilometre Array). Radio astronomy has a long and rich computing related history, and with that comes a big pile of poorly written, fragile, and badly maintained legacy code. This problem is not unique to radio astronomy but is a common in various scientific fields.

Although no quick solution exists when it comes to re-writing lots of legacy code, Docker helps to contain this fragile software, simplifies the installation and ensures that the software works. In this talk I will discuss how Papino, our umbrella project for containing various radio astronomy libraries and RODRIGUES, an online radio telescope simulator leverage Docker .

Gijs Molenaar

January 24, 2015
Tweet

More Decks by Gijs Molenaar

Other Decks in Science

Transcript

  1. Who Am I Gijs Molenaar Scientific Software Engineer in NL

    PhD student in SA MSc Artificial Intelligence 2 @gijzelaerr http://pythonic.nl
  2. 5

  3. 6

  4. 7

  5. 8

  6. 9

  7. Scientist Q Smart person Self educated on the field of

    software engineer Gets the job done Good at duct tape programming 11
  8. Data X Really big data Datasets of peta, exa bytes

    LOFAR - 50 GB/s SKA - 10 times global Internet traffic 12
  9. Software Y 13 Complex math heavy software Written during PhD

    of scientist Q Often bad coding practices (Unit) tests? Version control? ‘Runs on my computer’
  10. Like virtual machines But not no emulation Process isolation &

    virtual networking More like chroot/jail 15
  11. Image vs container Image set of ‘layers’ read-only stateless build

    with Dockerfile or commit container container instantiation of image stateful
  12. Dockerfile FROM ubuntu:14.04 MAINTAINER [email protected] ENV DEBIAN_FRONTEND noninteractive # enable

    universe, multiverse, restricted with world wide mirrors ADD apt.sources.list /etc/apt/sources.list RUN apt-get update RUN apt-get upgrade -y RUN apt-get install -y software-properties-common ## add radio astro PPA (with source packages) RUN add-apt-repository -ys ppa:radio-astro/main RUN apt-get update https://github.com/radio-astro/docker-images 19
  13. Dockerfile 2 FROM radioastro/base ADD debian_packages / ADD ska_packages /

    ADD python_packages / # update deb cache RUN apt-get update # install standard debian packages RUN cat /debian_packages | xargs apt-get install -y # installed the packaged software from the PPA RUN cat /ska_packages | xargs apt-get install -y # install all python modules RUN pip install astropy ## pip dependency management doesn't work properly RUN pip install -r /python_packages ## Expose the ipython notebook port EXPOSE 8888 VOLUME /notebooks ## Run ipython notebook CMD /usr/bin/python /usr/local/bin/ipython notebook --ip=*--notebook-dir=/notebooks --pylab inline
  14. Fig db: image: postgres:9.3 broker: image: dockerfile/rabbitmq worker: build: django_kat

    command: celery worker -A django_kat -l INFO links: - broker - db - mail environment: - DJANGO_SETTINGS_MODULE=django_kat.settings.container - C_FORCE_ROOT=true - SECRET_KEY="doesn't matter" django: build: django_kat command: uwsgi --socket django_kat.sock --module django_kat.wsgi links: - db - broker - mail volumes: - /code volumes_from: - worker viewer: image: gijzelaerr/cyberska_viewer volumes_from: - worker environment: - REDIRECT_URI ports: - 8081:80 - 8080:8080 https://github.com/ska-sa/ceiling-kat/blob/master/fig.yml
  15. OSX

  16. RATT Online Deconvolved Radio Image Generation Using Eclectic / Exciting

    / Experimental / Exotic /Extraordinary / Existential / Ephemeral / Esoteric Software 28 R.O.D.R.I.G.U.E.S.
  17. 30

  18. Tips & tricks keep containers small Don’t build VM’s Make

    single purpose containers and link them together (fig) Use environment variables to configure containers Or mount config files in them docker exec is really useful 33