docker/README.md

This folder contains a Dockerfile to build an image with R, scpcaTools and all of its dependencies.

The image is built from a versioned Rocker image, with additional R packages and other utilities added as needed.

It can be built with the following command run in this directory:

docker buildx build . --tag scpcatools --platform linux/amd64

Note that this image does not include RStudio, in attempt to make the image smaller.

This image is built automatically on every update to scpcaTools (main) and pushed to ghcr.io/alexslemonade/scpcatools:edge.

Release versions of scpcaTools will be tagged as ghcr.io/alexslemonade/scpcatools:latest and tagged by version number.

The main image includes all of the recommended packages for scpcaTools (aside from those only required for development), as well as the Python scanpy and scvi-tools packages and dependencies.

There are also smaller images that can be built by using the --target argument to specify a sub-image to build. For example, to build the slim image you would use the following command:

docker buildx build . --tag scpcatools-slim --platform linux/amd64 --target slim

The available targets are:

These images are built automatically on every update to scpcaTools (main) and pushed to ghcr.io/alexslemonade/scpcatool-slims:edge and ghcr.io/alexslemonade/scpcatools-scvi:edge, etc. Release versions will be tagged with latest and by version number.

Generating R and Python dependency files

Dependency lock files, with the exception of renv.lock, are built using the make-requirements.sh script. This script depends on pip-tools and should be run using Python 3.10 to match the default version of Python in the Docker images. For convenience, a conda environment.yml file is included in this directory that can be used to create an scpcatools-dev environment with the necessary Python version and packages.

This script will generate the requirements_*.txt and renv_*.lock files for each set of Python packages to be installed within the various Docker images. - The requirements files are based on requirements_*.in files that specify the high-level package requirements for each image. - The renv_*.lock files are strict subsets of the main renv.lock file that is use for development and for the full image. - The main renv.lock file should be updated manually using renv::snapshot() from within the scpcaTools project. - After updating renv.lock, the make-requirements.sh script should be run to update the renv_*.lock files.



AlexsLemonade/scpcaTools documentation built on July 12, 2024, 8:34 a.m.