-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from AlexsLemonade/jashapiro/265-slim-docker
Update python requirements and create slim docker image
- Loading branch information
Showing
28 changed files
with
6,842 additions
and
266 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
# Configure BioCManager to use Posit Public Package Manager: | ||
options(BioC_mirror = "https://p3m.dev/bioconductor") | ||
options(BIOCONDUCTOR_CONFIG_FILE = "https://p3m.dev/bioconductor/config.yaml") | ||
|
||
# activate renv | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
FROM rocker/r-ver:4.3.3 | ||
FROM bioconductor/r-ver:3.18 | ||
LABEL maintainer="[email protected]" | ||
LABEL org.opencontainers.image.source https://github.com/AlexsLemonade/scpcaTools | ||
|
||
COPY scripts/install_scpca_deps.sh . | ||
|
||
RUN bash ./install_scpca_deps.sh | ||
|
||
#### R packages | ||
# Use renv for R packages | ||
ENV RENV_CONFIG_CACHE_ENABLED FALSE | ||
|
@@ -15,14 +11,15 @@ WORKDIR /usr/local/renv | |
COPY renv.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* | ||
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 | ||
RUN Rscript -e "proc <- basilisk::basiliskStart(env = zellkonverter::zellkonverterAnnDataEnv(), testload = 'anndata'); \ | ||
basilisk::basiliskStop(proc)" | ||
basilisk::basiliskStop(proc); \ | ||
basilisk.utils::cleanConda()" | ||
|
||
#### Python packages | ||
COPY requirements.txt requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: scpcatools-dev | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python=3.10 | ||
- pip-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
# This script is used to generate or update requirements/lock files for R and Python packages | ||
# Requires that the `pip-tools` python package is installed. | ||
# Before running, make sure that the renv.lock file and installed libaries are | ||
# consistent with renv::snapshot() or renv::restore() | ||
|
||
# Set the working directory to the directory of this file | ||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
# Python package lists | ||
pip-compile --no-annotate --strip-extras --output-file=requirements.txt requirements.in | ||
pip-compile --no-annotate --strip-extras --output-file=requirements_anndata.txt requirements_anndata.in | ||
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 | ||
|
||
# reports lockfile | ||
Rscript scripts/make-lockfile.R -f renv_reports.lock -p ComplexHeatmap,ggforce,kableExtra,rmarkdown | ||
|
||
# zellkonverter lockfile | ||
Rscript scripts/make-lockfile.R -f renv_zellkonverter.lock -p zellkonverter | ||
|
||
# Seurat lockfile | ||
Rscript scripts/make-lockfile.R -f renv_seurat.lock -p Seurat |
Oops, something went wrong.