Skip to content

Commit

Permalink
provide information on enabled support in vol2bird. vol2bird-mistnet …
Browse files Browse the repository at this point in the history
…dockerfile
  • Loading branch information
adokter committed Oct 17, 2019
1 parent 61ace0e commit dbb19f4
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ MAINTAINER Adriaan Dokter
# * flex, otherwise configure script of RSL library does not function properly
RUN apt-get update && apt-get install --no-install-recommends -y libconfuse-dev \
libhdf5-dev gcc g++ wget unzip make cmake zlib1g-dev python-dev python-numpy libproj-dev flex file \
&& apt-get install -y git && apt-get install -y libgsl-dev && apt-get install -y libbz2-dev
&& apt-get install -y git git-lfs && apt-get install -y libgsl-dev && apt-get install -y libbz2-dev

8 changes: 1 addition & 7 deletions docker/Dockerfile.vol2bird
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,15 @@ RUN git clone https://github.com/adokter/rsl.git && cd rsl \
&& make install AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: \
&& cd .. && rm -rf rsl

# get a copy of libtorch:
RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.3.0%2Bcpu.zip \
&& unzip libtorch-shared-with-deps-1.3.0+cpu.zip -d /opt/radar \
&& rm libtorch-shared-with-deps-1.3.0+cpu.zip

# get a copy of vol2bird
# configure vol2bird
RUN git clone -b develop https://github.com/adokter/vol2bird.git \
&& cd vol2bird && ./configure --prefix=/opt/radar/vol2bird --with-rave=/opt/radar/rave --with-rsl=/opt/radar/rsl \
--with-gsl=/usr/include/gsl,/usr/lib/x86_64-linux-gnu \
--with-libtorch=/opt/radar/libtorch \
&& make && make install && cd .. && rm -rf vol2bird

# clean up
RUN apt-get remove -y git gcc g++ wget unzip make cmake python-numpy -y python-dev flex \
RUN apt-get remove -y git git-lfs gcc g++ wget unzip make cmake python-numpy -y python-dev flex \
&& apt-get clean && apt -y autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# prepare mount points
Expand Down
58 changes: 58 additions & 0 deletions docker/Dockerfile.vol2bird-mistnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM ubuntu/vol2bird
MAINTAINER Adriaan Dokter

# get a copy of hlhdf:
# configure and build hlhdf
# strange Docker conflict when attempting to install in /opt/radar/hlhdf, therefore in root radar instead
RUN git clone git://github.com/adokter/hlhdf.git \
&& cd hlhdf && ./configure --prefix=/opt/radar --with-hdf5=/usr/include/hdf5/serial,/usr/lib/x86_64-linux-gnu/hdf5/serial \
&& make && make install && cd .. && rm -rf hlhdf

# get a copy of rave:
# cd into rave source directory and configure
# using a clone from git://git.baltrad.eu/rave.git \
RUN git clone https://github.com/adokter/rave.git \
&& cd rave && ./configure --prefix=/opt/radar/rave --with-hlhdf=/opt/radar \
&& make && make install && cd .. && rm -rf rave

# get a copy of iris2odim:
RUN git clone https://github.com/adokter/iris2odim.git \
&& cd iris2odim && export RAVEROOT=/opt/radar \
&& make && make install && cd .. && rm -rf iris2odim

# get a copy of RSL:
RUN git clone https://github.com/adokter/rsl.git && cd rsl \
&& ./configure --prefix=/opt/radar/rsl \
&& make AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: \
&& make install AUTOCONF=: AUTOHEADER=: AUTOMAKE=: ACLOCAL=: \
&& cd .. && rm -rf rsl

# get a copy of libtorch:
RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.3.0%2Bcpu.zip \
&& unzip libtorch-shared-with-deps-1.3.0+cpu.zip -d /opt/radar \
&& rm libtorch-shared-with-deps-1.3.0+cpu.zip

# get a copy of vol2bird
# configure vol2bird
RUN git clone -b develop https://github.com/adokter/vol2bird.git \
&& cd vol2bird && ./configure --prefix=/opt/radar/vol2bird --with-rave=/opt/radar/rave --with-rsl=/opt/radar/rsl \
--with-gsl=/usr/include/gsl,/usr/lib/x86_64-linux-gnu \
--with-libtorch=/opt/radar/libtorch \
&& make && make install && cd .. && rm -rf vol2bird

# get a copy of MistNet
RUN pwd
RUN git lfs clone https://github.com/adokter/MistNet.git

# clean up
RUN apt-get remove -y git gcc g++ wget unzip make cmake python-numpy -y python-dev flex \
&& apt-get clean && apt -y autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# prepare mount points
RUN mkdir data

# set the paths to installed libraries and executables
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/radar/lib:/opt/radar/rave/lib:/opt/radar/rsl/lib:/opt/radar/vol2bird/lib:/usr/lib/x86_64-linux-gnu
ENV PATH=${PATH}:/opt/radar/vol2bird/bin:/opt/radar/rsl/bin

CMD vol2bird
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
CC ?= gcc
CXX = /usr/bin/c++ #note: has to be same compiler as used for Pytorch
#CFLAGS += -fPIC -x c -DFPRINTFON
CFLAGS += -I../lib -Wall -g
CFLAGS += -I../lib -Wall -g $(RSL_CFLAG) $(IRIS_CFLAG) $(MISTNET_CFLAG)
LDFLAGS += -L../lib

# define where the vol2bird stuff is
Expand Down
28 changes: 25 additions & 3 deletions src/vol2bird.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,32 @@ void usage(char* programName, int verbose){
fprintf(stderr," usage: %s --help\n", programName);

if(verbose){

fprintf(stderr,"\n Supported radar data formats:\n");
fprintf(stderr," * OPERA ODIM hdf5 input format, see <http://www.eumetnet.eu/opera-software>\n");
fprintf(stderr," * input formats compatible with RSL, see <http://trmm-fc.gsfc.nasa.gov/trmm_gv/software/rsl>\n");
fprintf(stderr," * Vaisala Sigmet IRIS format, see <ftp://ftp.sigmet.com/outgoing/manuals/IRIS_Programmers_Manual.pdf>\n\n");
fprintf(stderr," * OPERA ODIM hdf5 input format, see <http://www.eumetnet.eu/opera-software> [enabled]\n");
fprintf(stderr," * input formats compatible with RSL, see <http://trmm-fc.gsfc.nasa.gov/trmm_gv/software/rsl>");
#ifdef RSL
fprintf(stderr, " [enabled]\n");
#endif
#ifndef RSL
fprintf(stderr, " [disabled]\n");
#endif
fprintf(stderr," * Vaisala Sigmet IRIS format, see <ftp://ftp.sigmet.com/outgoing/manuals/IRIS_Programmers_Manual.pdf>");
#ifdef IRIS
fprintf(stderr, " [enabled]\n\n");
#endif
#ifndef IRIS
fprintf(stderr, " [disabled]\n\n");
#endif

fprintf(stderr, " Support for MistNet:");
#ifdef MISTNET
fprintf(stderr, " [enabled]\n\n");
#endif
#ifndef MISTNET
fprintf(stderr, " [disabled]\n\n");
#endif

fprintf(stderr," Output fields to stdout:\n");
fprintf(stderr," date - date [UTC]\n");
fprintf(stderr," time - time [UTC]\n");
Expand Down

0 comments on commit dbb19f4

Please sign in to comment.