Skip to content

Commit

Permalink
Merge pull request #274 from AlexsLemonade/jashapiro/unslim-a-bit
Browse files Browse the repository at this point in the history
Add batchelor to the slim image
  • Loading branch information
jashapiro authored May 8, 2024
2 parents aba6322 + fa668d1 commit 38764ab
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 21 deletions.
52 changes: 32 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ RUN Rscript -e "install.packages(c('renv'))"

COPY docker/renv_slim.lock renv.lock
# restore renv and remove cache files
RUN Rscript -e 'renv::restore()' && \
rm -rf ~/.cache/R/renv && \
rm -rf /tmp/downloaded_packages && \
rm -rf /tmp/Rtmp*
RUN Rscript -e 'renv::restore()'\
&& rm -rf ~/.cache/R/renv \
&& rm -rf /tmp/downloaded_packages \
&& rm -rf /tmp/Rtmp*


# Install scpcaTools package (& test loading)
Expand All @@ -32,22 +32,28 @@ FROM slim AS seurat
LABEL org.opencontainers.image.title "scpcatools-seurat"

COPY docker/renv_seurat.lock renv.lock
RUN Rscript -e 'renv::restore()' && \
rm -rf ~/.cache/R/renv && \
rm -rf /tmp/downloaded_packages && \
rm -rf /tmp/Rtmp*
RUN Rscript -e 'renv::restore()'\
&& rm -rf ~/.cache/R/renv \
&& rm -rf /tmp/downloaded_packages \
&& rm -rf /tmp/Rtmp*


##########################
# Add Reports support target ---------------------------------------------------
FROM slim AS reports
LABEL org.opencontainers.image.title "scpcatools-reports"

RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
pandoc \
&& rm -rf /var/lib/apt/lists/*

COPY docker/renv_reports.lock renv.lock
RUN Rscript -e 'renv::restore()' && \
rm -rf ~/.cache/R/renv && \
rm -rf /tmp/downloaded_packages && \
rm -rf /tmp/Rtmp*
RUN Rscript -e 'renv::restore()'\
&& rm -rf ~/.cache/R/renv \
&& rm -rf /tmp/downloaded_packages \
&& rm -rf /tmp/Rtmp*


##########################
Expand All @@ -56,10 +62,10 @@ FROM slim AS anndata
LABEL org.opencontainers.image.title "scpcatools-anndata"

COPY docker/renv_zellkonverter.lock renv.lock
RUN Rscript -e 'renv::restore()' && \
rm -rf ~/.cache/R/renv && \
rm -rf /tmp/downloaded_packages && \
rm -rf /tmp/Rtmp*
RUN Rscript -e 'renv::restore()'\
&& rm -rf ~/.cache/R/renv \
&& rm -rf /tmp/downloaded_packages \
&& rm -rf /tmp/Rtmp*

# Complete installation of zellkonverter conda env
ENV BASILISK_EXTERNAL_DIR /usr/local/renv/basilisk
Expand All @@ -86,11 +92,17 @@ RUN pip install --no-cache-dir -r requirements.txt
FROM scvi AS full
LABEL org.opencontainers.image.title "scpcatools"

RUN apt-get -y update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
pandoc \
&& rm -rf /var/lib/apt/lists/*

COPY renv.lock renv.lock
RUN Rscript -e 'renv::restore()' && \
rm -rf ~/.cache/R/renv && \
rm -rf /tmp/downloaded_packages && \
rm -rf /tmp/Rtmp*
RUN Rscript -e 'renv::restore()'\
&& rm -rf ~/.cache/R/renv \
&& rm -rf /tmp/downloaded_packages \
&& rm -rf /tmp/Rtmp*

COPY docker/requirements.txt requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion docker/make-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pip-compile --no-annotate --strip-extras --output-file=requirements_anndata.txt
pip-compile --no-annotate --strip-extras --output-file=requirements_scvi.txt requirements_scvi.in

# slim lockfile
Rscript scripts/make-lockfile.R -f renv_slim.lock
Rscript scripts/make-lockfile.R -f renv_slim.lock -p batchelor

# reports lockfile
Rscript scripts/make-lockfile.R -f renv_reports.lock -p ComplexHeatmap,ggforce,kableExtra,rmarkdown
Expand Down

0 comments on commit 38764ab

Please sign in to comment.