Skip to content
Merged

Rose #355

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions rose/ccbr_rose/Dockerfile.v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM mambaorg/micromamba:1.5.10

USER root
SHELL ["/bin/bash", "-lc"]

LABEL maintainer="Vishal Koparde *(kopardev on GitHub)*"
LABEL github_handle="kopardev"

# Build time variables
ARG DOCKERFILE="Dockerfile"
ENV DOCKERFILE=${DOCKERFILE}
ARG BUILD_DATE="000000"
ENV BUILD_DATE=${BUILD_DATE}
ARG BUILD_TAG="000000"
ENV BUILD_TAG=${BUILD_TAG}
ARG REPONAME="000000"
ENV REPONAME=${REPONAME}
ARG IMAGENAME="000000"
ENV IMAGENAME=${IMAGENAME}
ARG BASEIMAGENAME="000000"
ENV BASEIMAGENAME=${BASEIMAGENAME}

# Base utilities used by wrapper scripts
RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates bash coreutils findutils grep sed gawk \
&& rm -rf /var/lib/apt/lists/*

# Single-runtime environment: Python 2.7 only (+ ROSE deps and required tools)
# NOTE: use explicit channels; r-base 4.x is incompatible with python 2.7-era stack.
RUN micromamba create -y -n rose -c conda-forge -c bioconda \
python=2.7 \
"numpy<1.17" \
"scipy<1.3" \
"matplotlib<3" \
bedtools \
samtools \
"r-base<4" \
&& micromamba clean --all --yes

# Young lab ROSE from Bitbucket master
WORKDIR /opt
RUN curl -L "https://bitbucket.org/young_computation/rose/get/master.tar.gz" -o rose.tar.gz \
&& tar -xzf rose.tar.gz \
&& rm -f rose.tar.gz \
&& mv young_computation-rose-* ROSE

ENV ROSE_HOME=/opt/ROSE
ENV PATH=/opt/conda/envs/rose/bin:${ROSE_HOME}:${PATH}
ENV PYTHONPATH="${ROSE_HOME}"

# Include ROSE prep script in image
COPY _prep_rose_input.py /opt/ROSE/_prep_rose_input.py
RUN chmod 755 /opt/ROSE/_prep_rose_input.py

# Convenience wrappers
COPY run-prep-rose /usr/local/bin/run-prep-rose
COPY run-rose /usr/local/bin/run-rose
RUN chmod +x /usr/local/bin/run-prep-rose
RUN chmod +x /usr/local/bin/run-rose

# Copy Dockerfile and other files in a single layer
RUN mkdir -p /opt2 && mkdir -p /data2
COPY ${DOCKERFILE} /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}
RUN chmod -R a+rx /opt2 && chmod a+r /opt2/Dockerfile_${REPONAME}.${BUILD_TAG}

WORKDIR /work
ENTRYPOINT ["/usr/bin/env", "bash", "-lc"]
CMD ["echo 'Use run-prep-rose ... or run-rose ...'"]
Loading