FROM ubuntu:18.04

RUN apt-get update -y
RUN apt-get install wget -y
RUN apt-get install python3 -y
RUN apt-get install python-pip -y
RUN apt-get install python3-pip -y
RUN apt-get install git -y
RUN pip install pyyaml
RUN pip install jsonschema
RUN pip install pymonad
RUN pip3 install scipy
RUN pip3 install numpy
RUN pip3 install pandas

ENV METACACHE_DIR /metacache

RUN git clone https://github.com/muellan/metacache.git

WORKDIR $METACACHE_DIR

RUN git checkout 6c98408

# metacache build for k-mer size <=16
RUN make MACROS="-DMC_TARGET_ID_TYPE=uint32_t -DMC_WINDOW_ID_TYPE=uint32_t -DMC_KMER_TYPE=uint32_t"

WORKDIR /

ENV PATH ${PATH}:${METACACHE_DIR}/metacache

# do not touch this one
ADD entry /usr/local/bin/

ADD Taskfile /
ADD scripts/prepare_inputs.py /
ADD scripts/prepare_inputs1.sh /
ADD scripts/prepare_inputs2.sh /
ADD scripts/prepare_outputs.py /
ADD bins.header /
ADD scripts/prepare_profiles.sh /
ADD scripts/prepare_profiles.py /
ADD scripts/gunzip.sh /
ADD scripts/clean.sh /

# Do not change this
WORKDIR /bbx/tmp
ENTRYPOINT ["entry"]
