Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing dependencies in Docker #3

Merged
merged 6 commits into from
Nov 5, 2024
Merged
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
47 changes: 33 additions & 14 deletions inst/extdata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,31 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3-pip \
python3-dev

RUN apt-get update && apt-get -y upgrade && \
apt-get install -y build-essential wget \
libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev libcurl3-dev && \
apt-get clean && apt-get purge && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Comment on lines +23 to +28
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved this up so that the image layers are doing the more general / slow steps first. Just might save someone a couple minutes if they need to add a dependency later. https://docs.docker.com/get-started/docker-concepts/building-images/understanding-image-layers/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though looking at it now we are definitely pretty far from the most efficient dockerfile...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's okay, we will polish. we're still in the stage of figuring out what is needed here.

## Put more python packages we need here
################### Install idemp ###################
ENV FOLDER=idemp
ENV DST=/usr/src

WORKDIR $DST/

RUN git clone https://github.com/yhwu/idemp.git

WORKDIR $DST/$FOLDER

RUN make && \
ln -s $DST/$FOLDER/idemp /usr/local/bin

################### Install Seqtk ###################
ENV ZIP=seqtk-1.4.tar.gz
ENV URL=https://github.com/lh3/seqtk/archive/refs/tags/v1.4.tar.gz
ENV FOLDER=seqtk-1.4
ENV DST=/home/seqtk
ENV DST=/usr/src

RUN mkdir -p $DST && \
wget $URL -O $DST/$ZIP && \
Expand All @@ -34,15 +53,15 @@ RUN mkdir -p $DST && \

WORKDIR $DST/$FOLDER

RUN make
RUN make && \
ln -s $DST/$FOLDER/seqtk /usr/local/bin

################## Install Bowtie2 ##################

ENV ZIP=bowtie2-2.4.1-linux-x86_64.zip
ENV URL=https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.4.1
ENV FOLDER=bowtie2-2.4.1-linux-x86_64
ENV DST=/home/biodocker/bin
ENV ULOCAL=/usr/local/bin
ENV DST=/usr/local/bin

RUN mkdir -p $DST && \
wget $URL/$ZIP/download -O $DST/$ZIP && \
Expand All @@ -52,13 +71,6 @@ RUN mkdir -p $DST && \
rmdir $DST/$FOLDER

################## Install Samtools ##################

RUN apt-get update && apt-get -y upgrade && \
apt-get install -y build-essential wget \
libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev libcurl3-dev && \
apt-get clean && apt-get purge && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /usr/src

# Samtools
Expand All @@ -67,11 +79,18 @@ RUN wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9
rm samtools-1.9.tar.bz2 && \
cd samtools-1.9 && \
./configure --prefix $(pwd) && \
make

make && \
sudo ln -s /usr/src/samtools-1.9/samtools /usr/local/bin

################# COPY over config files
COPY config config/
COPY config /home/config/

#################### COPY scripts ###################
COPY scripts /home/scripts/

# TODO remove this once paths are not hard coded
#################### COPY data ######################
COPY data /home/data/

WORKDIR /data

Loading
Loading