Skip to content

Commit

Permalink
Merge pull request #85 from kundajelab/consolidate-docker-layers
Browse files Browse the repository at this point in the history
Consolidate docker layers
  • Loading branch information
panushri25 authored Mar 24, 2023
2 parents 1ea660f + 67a4577 commit 6e70dca
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ WORKDIR /scratch

# Install some basic utilities
RUN apt-get update --fix-missing && \
apt-get install -y wget bzip2 ca-certificates curl git
apt-get install -y --allow-unauthenticated wget bzip2 ca-certificates curl git jq libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install Google Cloud SDK
RUN apt-get update && apt install -y --allow-unauthenticated wget
RUN cd /opt/ && \
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-307.0.0-linux-x86_64.tar.gz && \
tar xvfz google-cloud-sdk-307.0.0-linux-x86_64.tar.gz && \
Expand All @@ -27,26 +28,15 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linu
# Enable Conda and alter bashrc so the Conda default environment is always activated
RUN ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
echo "conda activate base" >> ~/.bashrc && \
conda clean -tipy

# Attach Conda to PATH
ENV PATH /opt/conda/bin:$PATH

# Install SAMtools, BEDtools, and UCSC BedGraphToBigWig
RUN conda install -y -c conda-forge -c bioconda samtools bedtools ucsc-bedgraphtobigwig pybigwig meme

# Install jq
RUN apt-get install -y jq
RUN apt-get install -y libcairo2
RUN apt-get install -y libpango-1.0-0
RUN apt-get install -y libpangocairo-1.0-0
RUN apt-get install -y libgdk-pixbuf2.0-0
RUN apt-get install -y libffi-dev

# Clean up after apt and conda
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN conda clean -tipy

# Set environment variables for Python
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
Expand All @@ -56,10 +46,8 @@ RUN mkdir /scratch/chrombpnet
COPY . /scratch/chrombpnet

# need to upgrade pip for faster dependency resolution
RUN pip install --upgrade pip

# Install any needed packages specified in requirements.txt
RUN pip install -r /scratch/chrombpnet/requirements.txt
RUN pip install --upgrade pip && \
pip install -r /scratch/chrombpnet/requirements.txt

#Install chrombpnet itself
WORKDIR /scratch
Expand Down

0 comments on commit 6e70dca

Please sign in to comment.