Giter Club home page Giter Club logo

bioconductor_docker's Introduction

license Project Status: Active – The project has reached a stable, usable state and is being actively developed. Weekly devel build status

Docker containers for Bioconductor

Docker packages software into self-contained environments, called containers, that include necessary dependencies to run. Containers can run on any operating system including Windows and Mac (using modern Linux kernels) via the Docker engine.

Containers can also be deployed in the cloud using Amazon Elastic Container Service, Google Kubernetes Engine or Microsoft Azure Container Instances

Quick start

  1. Install Docker

  2. Run container with Bioconductor and RStudio

     docker run \
     	-e PASSWORD=bioc \
     	-p 8787:8787 \
     	bioconductor/bioconductor_docker:devel
    

    This command will run the docker container bioconductor/bioconductor_docker:devel on your local machine.

    RStudio will be available on your web browser at http://localhost:8787. The USER is fixed to always being rstudio. The password in the above command is given as bioc but it can be set to anything. 8787 is the port being mapped between the docker container and your host machine. NOTE: password cannot be rstudio.

    The user is logged into the rstudio user by default.

Why use Containers

With Bioconductor containers, we hope to enhance

  • Reproducibility: If you run some code in a container today, you can run it again in the same container (with the same tag) years later and know that nothing in the container has changed. You should always take note of the tag you used if you think you might want to reproduce some work later.

  • Ease of use: With one command, you can be running the latest release or devel Bioconductor. No need to worry about whether packages and system dependencies are installed.

  • Convenience: Easily start a fresh R session with no packages installed for testing. Quickly run an analysis with package dependencies not typical of your workflow. Containers make this easy.

Our aim is to provide up-to-date containers for the current release and devel versions of Bioconductor, and some older versions. Bioconductor’s Docker images are stored in Docker Hub; the source Dockerfile(s) are on Github.

Our release images and devel images are based on the Rocker Project - rocker/rstudio image and built when a Bioconductor release occurs.

Goals for new container architecture

A few of our key goals to migrate to a new set of Docker containers are,

  • to keep the image size being shipped by the Bioconductor team at a manageable size.

  • easy to extend, so developers can just use a single image to inherit and build their docker image.

  • easy to maintain, by streamlining the docker inheritance chain.

  • Adopt a "best practices" outline so that new community contributed docker images get reviewed and follow standards.

  • Adopt a deprecation policy and life cycle for images similar to Bioconductor packages.

  • Replicate the Linux build machines (malbec2) on the bioconductor/bioconductor_docker:devel image as closely as possible. While this is not fully possible just yet, this image can be used by maintainers who wish to reproduce errors seen on the Bioconductor Linux build machine and as a helpful debugging tool.

  • Make Bioconductor package binaries available to all users of the this container. Users can now install Bioconductor packages as binaries by simply doing, BiocManager::install(<character vector of packages>). This speeds up installation of Bioconductor packages by avoiding compilation.

    To see the latest status of the Bioconductor binary repository, check with BiocPkgTools::repositoryStats().

Current Containers

For each supported version of Bioconductor, we provide

  • bioconductor/bioconductor_docker:RELEASE_X_Y

  • bioconductor/bioconductor_docker:devel

Bioconductor's Docker images are stored in Docker Hub; the source Dockerfile(s) are in Github.

Using the containers

A well organized guide to popular docker commands can be found here. For convenience, below are some commands to get you started. The following examples use the bioconductor/bioconductor_docker:devel image.

Note: that you may need to prepend sudo to all docker commands. But try them without first.

Prerequisites: On Linux, you need Docker installed and on Mac or Windows you need Docker Toolbox installed and running.

List which docker machines are available locally
docker images
List running containers
docker ps
List all containers
docker ps -a
Resume a stopped container
docker start <CONTAINER ID>
Shell into a running container
docker exec -it <CONTAINER ID> /bin/bash
Shutdown container
docker stop <CONTAINER ID>
Delete container
docker rm <CONTAINER ID>
Delete image
docker rmi bioconductor/bioconductor_docker:devel

Running the container

The above commands can be helpful but the real basics of running a Bioconductor Docker involves pulling the public image and running the container.

Get a copy of public docker image
docker pull bioconductor/bioconductor_docker:devel
To run RStudio Server:
docker run -e PASSWORD=<password> \
	-p 8787:8787 \
	bioconductor/bioconductor_docker:devel

You can then open a web browser pointing to your docker host on port 8787. If you're on Linux and using default settings, the docker host is 127.0.0.1 (or localhost, so the full URL to RStudio would be http://localhost:8787). If you are on Mac or Windows and running Docker Toolbox, you can determine the docker host with the docker-machine ip default command.

In the above command, -e PASSWORD= is setting the RStudio password and is required by the RStudio Docker image. It can be whatever you like except it cannot be rstudio. Log in to RStudio with the username rstudio and whatever password was specified.

If you want to run RStudio as a user on your host machine, in order to read/write files in a host directory, please read this.

NOTE: If you forget to add the tag devel or RELEASE_X_Y while using the bioconductor/bioconductor_docker image, it will automatically use the latest tag which points to the latest RELEASE version of Bioconductor.

To run R from the command line:
docker run -it --user rstudio bioconductor/bioconductor_docker:devel R
To open a Bash shell on the container:
docker run -it --user rstudio bioconductor/bioconductor_docker:devel bash

Note: The docker run command is very powerful and versatile. For full documentation, type docker run --help or visit the help page.

[ Back to top ]

Mounting Additional Volume

One such option for docker run is -v to mount an additional volume to the docker image. This might be useful for say mounting a local R install directory for use on the docker. The path on the docker image that should be mapped to a local R library directory is /usr/local/lib/R/host-site-library.

The follow example would mount my locally installed packages to this docker directory. In turn, that path is automatically loaded in the R .libPaths on the docker image and all of my locally installed package would be available for use.

  • Running it interactively,

      docker run \
      	-v /home/my-devel-library:/usr/local/lib/R/host-site-library \
      	-it \
      	--user rstudio \
      	bioconductor/bioconductor_docker:devel
    

    without the --user rstudio option, the container is started and logged in as the root user.

    The -it flag gives you an interactive tty (shell/terminal) to the docker container.

  • Running it with RStudio interface

      docker run \
      	-v /home/my-devel-library:/usr/local/lib/R/host-site-library \
      	-e PASSWORD=password \
      	-p 8787:8787 \
      	bioconductor/bioconductor_docker:devel
    

Using docker-compose

To run the docker-compose file docker-compose.yaml from the same directory,

docker-compose up

Using docker-compose, the user can launch the image with a single command. The RStudio image is launched at http://localhost:8787.

The docker-composer.yaml includes settings so that the user doesn't have to worry about setting the port, password (default is bioc), or the volume to save libraries.

The library path, where all the packages are installed are automatically configured to use the volume $HOME/R/bioconductor_docker/<bioconductor_version>, in the case of the Bioconductor version 3.14, it would be $HOME/R/bioconductor_docker/3.14. This location is mounted on to the path, /usr/local/lib/R/host-site-library, which is the first value in your search path for packages if you check .libPaths().

When the user starts the docker image using docker-compose, it will recognize previously mounted libraries with the apprpriate bioconductor version, and save users time reinstalling the previously installed packages.

To add another volume for data, it's possible to modify the docker-compose.yml to include another volume, so all the data is stored in the same location as well.

volumes:
	- ${HOME}/R/bioconductor_docker/3.14:/usr/local/lib/R/host-site-library
	- ${HOME}/R/data:/home/rstudio

To run in the background, use the -d or --detach flag,

docker-compose up -d

If the image is run in a detached state, the container-name can be used to exec into the terminal if the user wishes root access in a terminal, without using RStudio.

Within the root user, additional system dependencies can be installed to make the image fit the needs of the user.

docker exec -it bioc-3.14 bash

For more information on how to use docker-compose, use the official docker-compose reference.

[ Back to top ]

Modifying the images

There are two ways to modify these images:

  1. Making changes in a running container and then committing them using the docker commit command.

     docker commit <CONTAINER ID> <name for new image>
    
  2. Using a Dockerfile to declare the changes you want to make.

The second way is the recommended way. Both ways are documented here.

Example 1:

My goal is to add a python package 'tensorflow' and to install a Bioconductor package called 'scAlign' on top of the base docker image i.e bioconductor/bioconductor_docker:devel.

As a first step, my Dockerfile should inherit from the bioconductor/bioconductor_docker:devel image, and build from there. Since all docker images are Linux environments, and this container is specifically 'Debian', I need some knowledge on how to install libraries on Linux machines.

In your new Dockerfile, you can have the following commands

# Docker inheritance
FROM bioconductor/bioconductor_docker:devel

# Update apt-get
RUN apt-get update \
	## Install the python package tensorflow
	&& pip install tensorflow		\
	## Remove packages in '/var/cache/' and 'var/lib'
	## to remove side-effects of apt-get update
	&& apt-get clean \
	&& rm -rf /var/lib/apt/lists/*

# Install required Bioconductor package
RUN R -e 'BiocManager::install("scAlign")'

This Dockerfile can be built with the command, (note: you can name it however you want)

docker build -t bioconductor_docker_tensorflow:devel .

This will let you use the docker image with 'tensorflow' installed and also scAlign package.

docker run -p 8787:8787 -e PASSWORD=bioc bioconductor_docker_tensorflow:devel

Example 2:

My goal is to add all the required infrastructure to be able to compile vignettes and knit documents into pdf files. My Dockerfile will look like the following for this requirement,

# This docker image has LaTeX to build the vignettes
FROM bioconductor/bioconductor_docker:devel

# Update apt-get
RUN apt-get update \
	&& apt-get install -y --no-install-recommends apt-utils \
	&& apt-get install -y --no-install-recommends \
	texlive \
	texlive-latex-extra \
	texlive-fonts-extra \
	texlive-bibtex-extra \
	texlive-science \
	texi2html \
	texinfo \
	&& apt-get clean \
	&& rm -rf /var/lib/apt/lists/*

## Install BiocStyle
RUN R -e 'BiocManager::install("BiocStyle")'

This Dockerfile can be built with the command,

docker build -t bioconductor_docker_latex:devel .

This will let you use the docker image as needed to build and compile vignettes for packages.

docker run -p 8787:8787 -e PASSWORD=bioc bioconductor_docker_latex:devel

[ Back to top ]

Singularity

The latest bioconductor/bioconductor_docker images are available on Singularity Hub as well. Singularity is a container runtime just like Docker, and Singularity Hub is the host registry for Singularity containers.

You can find the Singularity containers collection on this link https://singularity-hub.org/collections/3955.

These images are particularly useful on compute clusters where you don't need admin access. You need to have the module singularity installed. See https://singularity.lbl.gov/docs-installation (contact your IT department when in doubt).

If you have Singularity installed on your machine or cluster are:

Inspect available modules

module available

If Singularity is available,

module load singularity

Please check this link for specific usage instructions relevant to Singularity containers and their usage https://www.rocker-project.org/use/singularity/.

Microsoft Azure Container Instances

If you are a Microsoft Azure user, you have an option to run your containers using images hosted on Microsoft Container Registry.

Microsoft Container Registry (MCR) is the primary Registry for all Microsoft Published docker images that offers a reliable and trustworthy delivery of container images with a syndicated catalog

Using containers hosted on Microsoft Container Registry

You can learn more about the bioconductor_docker image hosted on Micosoft Container Registry here.

Pull the bioconductor_docker image from Microsoft Container Registry, specifying your tag of choice. Check here for the list of tags under "Full Tag Listing":

docker pull mcr.microsoft.com/bioconductor/bioconductor_docker:<tag>

To pull the latest image:

docker pull mcr.microsoft.com/bioconductor/bioconductor_docker:latest

Example: Run RStudio interactively from your docker container

To run RStudio in a web browser session, run the following and access it from 127.0.0.1:8787. The default user name is "rstudio" and you can specify your password as the example below (here, it is set to 'bioc'):

docker run --name bioconductor_docker_rstudio \
	-v ~/host-site-library:/usr/local/lib/R/host-site-library \
	-e PASSWORD='bioc'                               \
	-p 8787:8787                                     \
	mcr.microsoft.com/bioconductor/bioconductor_docker:latest

To run RStudio on your terminal:

docker run --name bioconductor_docker_rstudio \
	-it                                            \
	-v ~/host-site-library:/usr/local/lib/R/host-site-library \
	-e PASSWORD='bioc'                               \
	-p 8787:8787                                     \
	mcr.microsoft.com/bioconductor/bioconductor_docker:latest R

[ Back to top ]

Use Azure Container Instances to run bioconductor images on-demand on Azure

Azure Container Instances or ACI provide a way to run Docker containers on-demand in a managed, serverless Azure environment. To learn more, check out the documentation here.

Run bioconductor images using ACI

Prerequisites:

  1. An Azure account and a subscription you can create resources in

  2. Azure CLI

  3. Create a resource group within your subscription

You can run Azure CLI or "az cli" commands to create, stop, restart or delete container instances running any bioconductor image - either official images by bioconductor or images available on Microsoft Container Registry. To get started, ensure you have an Azure account and a subscription or create a free account.

Follow this tutorial to get familiar with Azure Container Instances.

To run the bioconductor image hosted on Microsoft Container Registry or MCR, create a new resource group in your Azure subscription. Then run the following command using Azure CLI. You can customize any or all of the inputs. This command is adapted to run on an Ubuntu machine:

az container create \
	--resource-group resourceGroupName \
	--name mcr-bioconductor \
	--image mcr.microsoft.com/bioconductor/bioconductor_docker \
	--cpu 2 \
	--memory 4 \
	--dns-name-label mcr-bioconductor \
	--ports 8787 \
	--environment-variables 'PASSWORD'='bioc'

When completed, run this command to get the fully qualified domain name(FQDN):

az container show \
	--resource-group resourceGroupName \
	--name mcr-bioconductor \
	--query "{FQDN:ipAddress.fqdn,ProvisioningState:provisioningState}" \
	--out table

Here we expose port 8787 on this publicly accessible FQDN. You may have to choose a different "dns-name-label" to avoid conflicts. By default, the username for RStudio is "rstudio" (similar to the official bioconductor docker image). Here we set the password for RStudio to 'bioc' in the environment variable configuration. The --cpu and --memory (in GB) configurations can also be customized to your needs. By default, ACI have 1 cpu core and 1.5GB of memory assigned.

To learn more about what you can configure and customize when creating an ACI, run:

az container create --help

Mount Azure File Share to persist analysis data between sessions

To ensure that the data persists between different analysis sessions when using Azure Container Instances, you can use the feature to mount Azure file share to your container instance. In this example, we will create an ACI that mounts the "/home/rstudio" directory in RStudio to an Azure File Share.

Prerequisites:

  1. An Azure account and a subscription you can create resources in

  2. Azure CLI

  3. Create a resource group within your subscription

Now, run the following Azure CLI commands to:

  1. Create an Azure Storage account

  2. Create an Azure file share

  3. Get the storage account key

# Change these four parameters as needed
ACI_PERS_RESOURCE_GROUP=resourceGroupName
ACI_PERS_STORAGE_ACCOUNT_NAME=storageAccountName
ACI_PERS_LOCATION=eastus
ACI_PERS_SHARE_NAME=fileShareName

# Step1: Create the storage account with the parameters
az storage account create \
	--resource-group $ACI_PERS_RESOURCE_GROUP \
	--name $ACI_PERS_STORAGE_ACCOUNT_NAME \
	--location $ACI_PERS_LOCATION \
	--sku Standard_LRS

# Step2: Create the file share
az storage share create \
	--name $ACI_PERS_SHARE_NAME \
	--account-name $ACI_PERS_STORAGE_ACCOUNT_NAME

# Step3: Get the storage account key
STORAGE_KEY=$(az storage account keys list \
	--resource-group $ACI_PERS_RESOURCE_GROUP \
	--account-name $ACI_PERS_STORAGE_ACCOUNT_NAME \
	--query "[0].value" --output tsv)
echo $STORAGE_KEY

Here is an example command to mount an Azure file share to an ACI running bioconductor. This command is adapted to run on an Ubuntu machine:

az container create \
	--resource-group resourceGroupName \
	--name mcr-bioconductor-fs \
	--image mcr.microsoft.com/bioconductor/bioconductor_docker \
	--dns-name-label mcr-bioconductor-fs \
	--cpu 2 \
	--memory 4 \
	--ports 8787 \
	--environment-variables 'PASSWORD'='bioc' \
	--azure-file-volume-account-name storageAccountName \
	--azure-file-volume-account-key $STORAGE_KEY \
	--azure-file-volume-share-name fileShareName \
	--azure-file-volume-mount-path /home/rstudio

When completed, run this command to get the fully qualified domain name or FQDN:

az container show \
	--resource-group resourceGroupName \
	--name mcr-bioconductor-fs \
	--query "{FQDN:ipAddress.fqdn,ProvisioningState:provisioningState}" \
	--out table

Here we expose port 8787 on this publicly accessible FQDN. You may have to choose a different "dns-name-label" to avoid conflicts. By default, the username for RStudio is "rstudio" (similar to the official bioconductor docker image). Here we set the password for RStudio to 'bioc' in the environment variable configuration. The "--cpu" and "--memory" (in GB) configurations can also be customized to your needs. By default, ACI have 1 cpu core and 1.5GB of memory assigned. Here, we also mount RStudio "/home/rstudio" directory to a persistent Azure file share named "fileShareName" in the storage account specified. When you stop or restart an ACI, this data will not be lost.

Stop, Start, Restart or Delete containers running on ACI

You can run Azure CLI commands to stop, start, restart or delete container instances on Azure. You can find all the commands and options here.

Replace containerName and resourceGroupName in the following CLI commands.

Stop the container instance
az container stop -n containerName -g resourceGroupName
Start the container instance
az container start -n containerName -g resourceGroupName
Restart the container instance
az container restart -n containerName -g resourceGroupName
Delete the container instance
az container delete -n containerName -g resourceGroupName

To not be prompted for confirmation for deleting the ACI:

az container delete -n containerName -g resourceGroupName -y

To troubleshoot any issues when using Azure Container Instances, try out the recommendations here. For feedback or further issues, contact us via email.

[ Back to top ]

How to Contribute

There is a comprehensive list of best practices and standards on how community members can contribute images here.

link: https://github.com/Bioconductor/bioconductor_docker/blob/master/best_practices.md

Deprecation Notice

For previous users of docker containers for Bioconductor, please note that we are deprecating the following images. These images were maintained by Bioconductor Core, and also the community.

Legacy Containers

These images are NO LONGER MAINTAINED and updated. They will however be available to use should a user choose. They are not supported anymore by the Bioconductor Core team.

Bioconductor Core Team: [email protected]

Steffen Neumann: [email protected], Maintained as part of the "PhenoMeNal, funded by Horizon2020 grant 654241"

Laurent Gatto: [email protected]

RGLab: [email protected]

First iteration containers

  • bioconductor/devel_base
  • bioconductor/devel_core
  • bioconductor/devel_flow
  • bioconductor/devel_microarray
  • bioconductor/devel_proteomics
  • bioconductor/devel_sequencing
  • bioconductor/devel_metabolomics
  • bioconductor/release_base
  • bioconductor/release_core
  • bioconductor/release_flow
  • bioconductor/release_microarray
  • bioconductor/release_proteomics
  • bioconductor/release_sequencing
  • bioconductor/release_metabolomics

Reason for deprecation

The new Bioconductor Docker image bioconductor/bioconductor_docker makes it possible to easily install any package the user chooses since all the system dependencies are built in to this new image. The previous images did not have all the system dependencies built in to the image. The new installation of packages can be done with,

BiocManager::install(c("package_name", "package_name"))

Other reasons for deprecation:

  • the chain of inheritance of Docker images was too complex and hard to maintain.

  • Hard to extend because there were multiple flavors of images.

  • Naming convention was making things harder to use.

  • Images which were not maintained were not deprecated.

Reporting Issues

Please report issues with the new set of images on GitHub Issues or the Bioc-devel mailing list.

These issues can be questions about anything related to this piece of software such as, usage, extending Docker images, enhancements, and bug reports.

Acknowledgements

Thanks to the rocker project for providing the R/RStudio Server containers upon which ours are based.

bioconductor_docker's People

Contributors

almahmoud avatar bioc-docker-bot avatar js2264 avatar jwokaty avatar link-ny avatar lshep avatar martin-g avatar nturaga avatar rushtehrani avatar seandavi avatar zeehio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bioconductor_docker's Issues

Link to localhost in Documentation Gives SSL Error

Hi Nitesh,

I just played around with the Docker containers to reproduce an error. Thank you very much for providing those, they make it much easier to reproduce problems that appear on other machines.

In the Quick Start section of the Docker Containers for Bioconductor page, it is suggested to go to https://localhost:8787. However on my machine, I get an ERR_SSL_PROTOCOL_ERROR which is particularly confusing because the site looks very similar to a page if the application wasn't running:

image

The error goes away if you go to the standard http page at http://localhost:8787.

Best, Constantin

Update bioconductor_docker images for consistency w/ upstream Rocker images

After the upstream Rocker project builds container images for a new R release version, container images for the previous version are rebuilt to pin specific CRAN and CTAN repository dates, and the RStudio Server version is updated until that occurs:

https://github.com/rocker-org/rocker-versioned2/wiki/Versions

e.g.,

$ docker run -it --rm rocker/ml-verse:4.3.1 rstudio-server version
...
2023.09.1+494 (Desert Sunflower) for Ubuntu Jammy
$ docker run -it --rm rocker/ml-verse:4.3.1 env | grep -e CRAN -e CTAN_REPO
CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/2023-10-30
CTAN_REPO=https://www.texlive.info/tlnet-archive/2023/10/30/tlnet

However, the bioconductor_docker image build schedule is such that corresponding bioconductor_docker images are not necessarily consistent w.r.t. their RStudio Server, CRAN, and CTAN versions:

$ docker run -it --rm bioconductor/ml-verse:3.17-R-4.3.1 rstudio-server version
...
2023.06.2+561 (Mountain Hydrangea) for Ubuntu Jammy
$ docker run -it --rm bioconductor/ml-verse:3.17-R-4.3.1 env | grep -e CRAN -e CTAN_REPO
CRAN=https://packagemanager.posit.co/cran/__linux__/jammy/latest
CTAN_REPO=https://mirror.ctan.org/systems/texlive/tlnet

Would it be possible to adjust the bioconductor_docker container image update cadence so it behaves similarly w.r.t. RStudio Server version & CRAN/CTAN repository version locking? (E.g., after a rocker image is released for a new R version, rebuild the corresponding bioconductor_docker images for the previous version)

What is the recommended way to run R CMD check with these containers?

I'm using the container bioconductor/bioconductor_docker:RELEASE_3_10.

When I try to run an R CMD check using this container, I get:

* checking PDF version of manual ... WARNING
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
* checking PDF version of manual without hyperrefs or index ... ERROR
Re-running with no redirection of stdout/stderr.
Hmm ... looks like a package
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  pdflatex is not available
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  pdflatex is not available
Error in running tools::texi2pdf()

I presume this is because this container doesn't contain all the required latex stuff for building PDF manuals. That's probably by design since the latex dependencies are huge -- but in this case, what is the recommended way to do R CMD check ?

Further, running a BiocCheck in the container also fails since BiocCheck hasn't been included.

R CMD BiocCheck rigd_1.0.tar.gz 
/usr/local/lib/R/bin/Rcmd: 62: exec: BiocCheck: not found

What is the recommended way to use the containers for package building/checking? Do you think it makes sense to maintain some kind of a 'building' image that includes these prerequisites?

volume setup for caching basilisk infrastructure?

The docker-compose item in README tells how to map a local folder to a volume for storing installed
packages. As we expand the scope of Bioc-python interactions, it may be of interest to store, locally,
the conda resources managed by basilisk. I have tried this out with -v $HOME/dockrcache_314:/root/.cache
but ran into:

> example(basiliskRun)

bslskR> ## Don't show: 
bslskR> basilisk.utils::installConda()
PREFIX=/root/.cache/R/basilisk/1.5.0/0
Unpacking payload ...
Collecting package metadata (current_repodata.json): done                                                         
Solving environment: done

## Package Plan ##

  environment location: /root/.cache/R/basilisk/1.5.0/0

  added / updated specs:
    - _libgcc_mutex==0.1=main
    - ca-certificates==2020.1.1=0
    - certifi==2020.4.5.1=py37_0
    - cffi==1.14.0=py37he30daa8_1
    - chardet==3.0.4=py37_1003
    - conda-package-handling==1.6.1=py37h7b6447c_0
    - conda==4.8.3=py37_0
    - cryptography==2.9.2=py37h1ba5d50_0
    - idna==2.9=py_1
    - ld_impl_linux-64==2.33.1=h53a641e_7
    - libedit==3.1.20181209=hc058e9b_0
    - libffi==3.3=he6710b0_1
    - libgcc-ng==9.1.0=hdf63c60_0
    - libstdcxx-ng==9.1.0=hdf63c60_0
    - ncurses==6.2=he6710b0_1
    - openssl==1.1.1g=h7b6447c_0
    - pip==20.0.2=py37_3
    - pycosat==0.6.3=py37h7b6447c_0
    - pycparser==2.20=py_0
    - pyopenssl==19.1.0=py37_0
    - pysocks==1.7.1=py37_0
    - python==3.7.7=hcff3b4d_5
    - readline==8.0=h7b6447c_0
    - requests==2.23.0=py37_0
    - ruamel_yaml==0.15.87=py37h7b6447c_0
    - setuptools==46.4.0=py37_0
    - six==1.14.0=py37_0
    - sqlite==3.31.1=h62c20be_1
    - tk==8.6.8=hbc83047_0
    - tqdm==4.46.0=py_0
    - urllib3==1.25.8=py37_0
    - wheel==0.34.2=py37_0
    - xz==5.2.5=h7b6447c_0
    - yaml==0.1.7=had09818_2
    - zlib==1.2.11=h7b6447c_3


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/linux-64::certifi-2020.4.5.1-py37_0
  cffi               pkgs/main/linux-64::cffi-1.14.0-py37he30daa8_1
  chardet            pkgs/main/linux-64::chardet-3.0.4-py37_1003
  conda              pkgs/main/linux-64::conda-4.8.3-py37_0
  conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.6.1-py37h7b6447c_0
  cryptography       pkgs/main/linux-64::cryptography-2.9.2-py37h1ba5d50_0
  idna               pkgs/main/noarch::idna-2.9-py_1
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_1
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1g-h7b6447c_0
  pip                pkgs/main/linux-64::pip-20.0.2-py37_3
  pycosat            pkgs/main/linux-64::pycosat-0.6.3-py37h7b6447c_0
  pycparser          pkgs/main/noarch::pycparser-2.20-py_0
  pyopenssl          pkgs/main/linux-64::pyopenssl-19.1.0-py37_0
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py37_0
  python             pkgs/main/linux-64::python-3.7.7-hcff3b4d_5
  readline           pkgs/main/linux-64::readline-8.0-h7b6447c_0
  requests           pkgs/main/linux-64::requests-2.23.0-py37_0
  ruamel_yaml        pkgs/main/linux-64::ruamel_yaml-0.15.87-py37h7b6447c_0
  setuptools         pkgs/main/linux-64::setuptools-46.4.0-py37_0
  six                pkgs/main/linux-64::six-1.14.0-py37_0
  sqlite             pkgs/main/linux-64::sqlite-3.31.1-h62c20be_1
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  tqdm               pkgs/main/noarch::tqdm-4.46.0-py_0
  urllib3            pkgs/main/linux-64::urllib3-1.25.8-py37_0
  wheel              pkgs/main/linux-64::wheel-0.34.2-py37_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  yaml               pkgs/main/linux-64::yaml-0.1.7-had09818_2
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Preparing transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(698): An error occurred while installing package 'defaults::ncurses-6.2-he6710b0_1'.

CondaError: Cannot link a source that does not exist. /root/.cache/R/basilisk/1.5.0/0/pkgs/ncurses-6.2-he6710b0_1/share/terminfo/E/Eterm-color
Running `conda clean --packages` may resolve your problem.
()

Error in basilisk.utils::installConda() : 
  conda installation failed with status code '1'

If I remove that -v setting, the example runs fine, but the conda environment is built from scratch. That's what
I am hoping to avoid. @LTLA might have a comment?

Conflicting definitions of "devel"/"release" between actual Bioconductor and bioconductor_docker

Unless I'm missing something, there appears to be a lag between when Bioconductor changes the previous devel to become the current release (3.14 as of today), and when the bioconductor/bioconductor_docker container is updated (it currently lists 3.14 as the devel and 3.13 as the release, which is no longer true).
https://hub.docker.com/layers/bioconductor/bioconductor_docker/devel/images/sha256-5edc02a68f1bbee9db21950b95c133aaab97e15781d3cc1690fed41b3689c2d2?context=explore

This causes (GitHub Action) workflows that depend on harmonized devel/release naming schemes across Bioconductor and bioconductor_docker to break.

How long of a delay is there between when a new version of Bioconductor is released and when this bioconductor_docker is updated? Is this something that is currently automated?

GHA workflow

Example GHA workflow output

R devel version lagging significantly

The current bioconductor_docker:devel (container ID fcc8b104b689) is running an r-devel from January 28:

R Under development (unstable) (2020-01-28 r77738)

The build system is running:

* using R Under development (unstable) (2020-03-12 r77934)

Is there a way to keep bioconductor_docker:devel more up to date with the build system?

ERROR; return code from pthread_create() is 22 when calling preprocessCore::normalize.quantiles()

Describe the bug

Running preprocessCore::normalize.quantiles() generates the following error using bioconductor/bioconductor_docker:devel

Error: processing vignette 'v02-QFeaturesPipeline.Rmd' failed with diagnostics:
ERROR; return code from pthread_create() is 22

See here for a full check.

To Reproduce
Steps to reproduce the behavior:

  1. This run, that uses quantile normalisation produces the error above.
  2. This run, using a different normalisation (that doesn't use preprocessCore::normalize.quantiles()) succeeds. The only difference between these two can be found here.

Expected behavior

The expected behaviour would be for the normalize() call to succeed, like in case 1 above. The code in case 2 above works locally.

Additional context

The following post suggest that it might be related to libopenblas.

This is a follow up from a question that I originally posted on slack (that I thought was sorted out).

permission issue - mounting files from host

Hi,

I have problem sorting out a file permission issue when sharing files from the host and the container.

When running with a fixed user and userid

docker run -d -it -e USER=$USER -e USERID=$UID -e PASSWORD=bioc -p 8788:8787 -v /home/$USER/GitHub:/home/bioc/github --name biocdevel biocdevel

Rstudio reports an error during startup in the browser Error occurec during transmission

Without the user specified file permissions are set to 1001:staff, and without setting a userid the file permissions are set to 1001:$usergroup, which is both incompatible with the host user.

I think this is due to the fact that an additional user bioc was added, since rocker/rstudio:devel does not exhibit this issue.

Is there any way to fix this during startup of the container?

Best regards
Felix

Lighter bioconductor container in the future?

Thank you for creating containers with bioconductor, I use it quite often to build my own containers with packages such as plyranges or rtracklayer.

The container image is now: 1.36 GB here

At the moment, it sometime causes problem when I use the container via apptainer on a partition that has a limited memory size (issue with the cache of the container).

I was wondering if there is a plan to reduce the base image size in order to allow for lighter containers in the future?

Or are there may be already some tips to reduce the size of the container after built?

Thanks in advance!

Jihed

bug: new library path auto added to .libPaths() upon mounting a volume

Describe the bug

Mounting a package library path to host-site-library leads to the addition of "/home/rstudio/R/x86_64-pc-linux-gnu-library/4.1" as the first search term in the library path.

> .libPaths()
[1] "/home/rstudio/R/x86_64-pc-linux-gnu-library/4.1"
[2] "/usr/local/lib/R/host-site-library"             
[3] "/usr/local/lib/R/site-library"                  
[4] "/usr/local/lib/R/library"    

To Reproduce
Steps to reproduce the behavior:

  1. Start container, and devel-lib is the location where I've been installing all my packages so far
docker run \
       --rm \
       -v /home/niteshturaga/devel-lib/:/usr/local/lib/R/host-site-library  \
       -p 8787:8787 \
       -e DISABLE_AUTH=true \
       bioconductor/bioconductor_docker:devel
  1. check .libPaths() on R session

Expected behavior

The library search path should have only 3 entries.

> .libPaths()
[1] "/usr/local/lib/R/host-site-library"             
[2] "/usr/local/lib/R/site-library"                  
[3] "/usr/local/lib/R/library"    

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser: Chrome

Incorrect references to `rockerdev` Rocker organization in release process document

Under https://github.com/Bioconductor/bioconductor_docker/blob/master/docs/release_process.md, there are a few references to the rockerdev Rocker organization and images. rockerdev was a brief-lived experimental namespace. With Docker Hub ending free support for team organizations, we expect to shut it down. (rocker/ should continue under Docker's open-source project support.)

I'm not sure if these are just mistaken documentation or something actually uses images from rockerdev/, but they haven't been updated in 3 years and anything that uses them should switch to the main rocker/ repository.

Update `latest` version to be the same as `RELEASE_3_13`

Looking at bioconductor/bioconductor_docker in DockerHub, we can see a discrepancy between push dates for different image versions:

  • latest was last pushed 5 months ago (and still contains Bioconductor 3.12)
  • RELEASE_3_13 was pushed 16 hours ago
  • RELEASE_3_12 was released 1 month ago (so latest isn't even up-to-date compared to RELEASE_3_12...)

I always use the latest tag but it needs to be kept updated with the others. Could the latest tag somehow be automatically built to avoid such issues in the future? Thank you!

Add python3.8-venv to the bioconductor_docker container?

Describe the bug

A best practice with python might be to use virtual environments, but the software to do so is not installed by default. It is problematic to install this software when running the container as a user (e.g.,in RStudio, where {reticulate} can make use of virtual environments.

To Reproduce

$ docker pull bioconductor/bioconductor_docker:devel
$ docker run -it --rm bioconductor/bioconductor_docker:devel bash
root@57cce2d49936:/# python3 -m venv test-env
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.8-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/test-env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

This is also seen when using reticulate::virtualenv_create()

> virtualenv_create("my_virtualenv")
Using Python: /usr/bin/python3.8
Creating virtual environment 'my_virtualenv' ...
+ '/usr/bin/python3.8' -m venv '/root/.virtualenvs/my_virtualenv'
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.8-venv

Feature Request

Add the apt module python3.8-venv to the bioconductor docker container

Why not use R_LIBS_* variables instead of hard-coded container library?

Related to Bioconductor/bioc_docker#93

In these lines, you prepend a within-container path to R_LIBS.

RUN echo "R_LIBS=/usr/local/lib/R/host-site-library:\${R_LIBS}" > /usr/local/lib/R/etc/Renviron.site \
&& echo "options(defaultPackages=c(getOption('defaultPackages'),'BiocManager'))" >> /usr/local/lib/R/etc/Rprofile.site

I believe this is what is precluding me from using the R_LIBS_USER or R_LIBS_SITE variables, because you are forcing the local container lib folder to have a higher priority. This makes these containers unusable for a use case where I want to use the container mount a local library using the traditional method.

For example, I'm running this:

docker run --rm --init -it \
   --user=$(id -u):$(id -g) \
  --network="host" \
  --env "DISPLAY" \
  --env "R_LIBS_USER" \
  --volume "$HOME:$HOME" \
  --volume="/etc/group:/etc/group:ro" \
  --volume="/etc/passwd:/etc/passwd:ro" \
  --volume="/etc/shadow:/etc/shadow:ro"  \
  --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
  --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
  --workdir="`pwd`" \
  bioconductor/bioconductor_docker:RELEASE_3_10 R

and I see:

R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
Bioconductor version 3.10 (BiocManager 1.30.10), ?BiocManager::install for help
> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/local/lib/R/library"     
[3] "/home/nsheff/R/3.6"

The path I passed along via R_LIBS_USER is showing up as the lowest priority library. This causes some problems:

  1. I cannot install a local higher-priority version of something you've stuck into /usr/local/lib/R/library within the container.
  2. When I install a package, sometimes it fails because the highest priority libraries are not writable. BiocManger::install prompts, and installs into /home only if I override:
BiocManager::install("GenomicRanges")
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.2 (2019-12-12)
Installing package(s) 'GenomicRanges'
Warning in install.packages(...) :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) yes

, but devtools does not:

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Error: Failed to install 'GenomicDistributions' from GitHub:
  (converted from warning) 'lib = "/usr/local/lib/R/site-library"' is not writable

Workaround

In a nutshell, whatI want to do this:

docker run -it -e R_LIBS_USER=/<path> <image> R

The container setup requires instead, this:

docker run -it --volume=/home/nsheff/.local/lib/R/3.6:/usr/local/lib/R/host-site-library \=/<path> <image> R

The problem with this is that I cannot use a variable (like %v) that will make this persist across different versions of R. This increases the manual overhead required when changing R versions. Furthermore, this means learning a new way to set libraries, where the old way would have worked fine (and in fact, even better). I think the environment variable way is superior because:

  1. It's the expected way that R has established library locations. So, it's already familiar to R users
  2. It is more flexible as you can put system-dependent information in there.

I see no advantages to the forced host mount method. Perhaps I have missed something and there is some limitation preventing my proposal?

Could not connect to the R session on RStudio Server

Describe the bug

After login, RStudio Server shows

Screenshot from 2022-08-26 12-45-03

To Reproduce

Consider the following docker-compose.yml:

version: "3.9"
services:

  dev:
    image: bioconductor/bioconductor_docker:devel
    environment:
      USERID: $UID
      PASSWORD: bioc
    ports:
      - 8787:8787
    working_dir: /home/rstudio
    volumes:
      - .:/home/rstudio

Steps to reproduce the behavior:

  1. Run docker compose up dev --build
  2. Open http://localhost:878 with your web browser
  3. Login using rstudio and bio for the username and password, respectively.

Expected behavior

Access the web version of the RStudio IDE.

Screenshots

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 (Linux raniere 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux)
  • Docker version 20.10.17, build 100c701
  • Docker Compose version v2.6.0
  • Browser: Chrome
  • Browser Version: 103

RStudio debugger broken

The RStudio version I'm getting from the current container is 1.2.5033, it crashes whenever I try to debug.

f <- function() {
    1
}

debug(f)
f()

This has been reported as a RStudio bug rstudio/rstudio#5888, and supposedly fixed in RStudio 1.2.5036.

rocker version for bioc-devel

In the spirit of building against development software, perhaps this should instead use rocker/r-ver:devel? R 4.0.0 is now a couple months old. I realize this will mean frequent large docker pulls, but maybe it could just be done e.g. weekly? Or, on each new x.y.z "z" release?

FROM rockerdev/rstudio:4.0.0-ubuntu18.04

New docker images fail running apt-get update?

Hello,

I recently tried updating one of our docker containers to use bioconductor_docker:RELEASE_3_10. When I ran "apt-get update", it fails with errors along the lines of the following. I think this has to do with the date being incorrect on the image?

Step 1/2 : from bioconductor/bioconductor_docker:RELEASE_3_10
---> 35e63c04aa52
Step 2/2 : RUN apt-get update -y
---> Running in 5a17e10abbf4
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7,907 kB]
Reading package lists...
E: Release file for http://security.debian.org/debian-security/dists/buster/updates/InRelease is not valid yet (invalid for another 6d 2h 55min 29s). Updates for this repository will not be applied.
E: Release file for http://deb.debian.org/debian/dists/buster-updates/InRelease is not valid yet (invalid for another 7d 9h 38min 1s). Updates for this repository will not be applied.

This simple docker file is sufficient to repro, at least for me:


from bioconductor/bioconductor_docker:RELEASE_3_10

RUN apt-get update -y

Unable to install additional Bioconductor packages.

Hi, I am installing additional new bioconductor packages [ BiocManager::install() ] while running this Docker image and I get an error.
I get the same error message for any bioconductor package.
I also get the same error when I write a DockerFile that adds a new bioconductor package based on this Docker image and run a docker build.
When I ran the same command with the same image file a few months ago, it worked fine.

BiocManager::install("TxDb.Dmelanogaster.UCSC.dm6.ensGene")
Error: Bioconductor version cannot be validated; no internet connection? See #troubleshooting
section in vignette
In addition: Warning messages:
1: In file(con, "r") :
URL 'https://bioconductor.org/config.yaml': status was 'Couldn't resolve host name'
2: In file(con, "r") :
URL 'http://bioconductor.org/config.yaml': status was 'Couldn't resolve host name'

I have not changed the docker image or environment between last time and this time.

Have the specifications for Bioconductor changed recently??

*Ubuntu 20.04.4 LTS (on WSL2), Docker version 20.10.18

R graphics engine version 14 is not supported by this version of RStudio

Describe the bug

R graphics engine version 14 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.

To Reproduce

Positive control: start a container with the latest release:

docker run -e PASSWORD=bioc -p 8787:8787 bioconductor/bioconductor_docker:RELEASE_3_13

theb run plot(1:10) in the console to generate a plot in the Plots tab.

However, this fails with devel:

docker run -e PASSWORD=bioc -p 8787:8787 bioconductor/bioconductor_docker:devel

plot(1:10) throws the warning above and produces the plot in Rplots.pdf instead than on screen.

Screenshots

2021-09-02-185853_1210x377_scrot

Missing `checkbashisms` script creates warning from running check

I'm careful to squash any warnings output by running CRAN's check on my package with CI. After many warning-free builds, I just added a configure script to my package and noticed a warning generated [1]

* checking top-level files ... WARNING
A complete check needs the 'checkbashisms' script.
See section ‘Configure and cleanup’ in the ‘Writing R Extensions’
manual.

... from the docker image bioconductor/bioconductor_docker:RELEASE_3_13 presumably because it finds my configure script but the image does not include the perl script checkbashisms [2] to confirm that configure does not use non-portable shell syntax.

Would it make sense for you to install the checkbashisms command in the image so that check works out of the box for packages with configure scripts? Your docker image runs Ubuntu 20.04, so you'll need to install the devscripts package to install checkbashisms.

I confirmed on my local Debian machine that I also see the warning, and that installing the devscripts package makes the warning go away.

I don't see devscripts in your current Dockerfile [3].

[1] https://gitlab.com/coregenomics/tsshmm/-/jobs/1541592549#L197

[2] https://cran.r-project.org/doc/manuals/r-release/R-exts.html#FOOT26

[3] https://github.com/Bioconductor/bioconductor_docker/blob/master/Dockerfile

libpath to put the custom lib folder in the front

Describe the bug

Hi, I am using the docker container and want to use my custom R library on my host

sudo docker run \
  	-v /home/R/host-site-library:/usr/local/lib/R/host-site-library \
  	-p 8787:8787 \
  	bioconductor/bioconductor_docker:RELEASE_3_15
> .libPaths()
[1] "/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2" "/usr/local/lib/R/host-site-library"             
[3] "/usr/local/lib/R/site-library"                   "/usr/local/lib/R/library"  

but the "/home/rstudio/R/x86_64-pc-linux-gnu-library/4.2" is before "/usr/local/lib/R/host-site-library", so I can not install the new packages to the host.

Thanks!

update README

          I think the whole README is kind of out of date, especially now that we host multiple flavors. I am hoping I have time after all AnVIL pieces are released and Smorgasbord is done to stop all new development and go back and document repos from the past year as many are in need of an update. Relatedly, the container portion on bioconductor.org also needs a new pass...

Originally posted by @almahmoud in #80 (comment)

Problems with packagemanager.rstudio.com

Given the numerous dependency problems we're seeing on #biocworkshopbook (igraph, Rcpp) with rstudio binaries, it seems our Docker image shouldn't be using the packagemanager.rstudio.com mirror by default, and that options(repos = c(CRAN = 'https://cran.r-project.org')) would be a safer default.

Currently:

$ docker run -it bioconductor/bioconductor_docker:devel Rscript -e "BiocManager::repositories()"
Bioconductor version 3.12 (BiocManager 1.30.10), ?BiocManager::install for help
                                                        BioCsoft 
                   "https://bioconductor.org/packages/3.12/bioc" 
                                                         BioCann 
        "https://bioconductor.org/packages/3.12/data/annotation" 
                                                         BioCexp 
        "https://bioconductor.org/packages/3.12/data/experiment" 
                                                   BioCworkflows 
              "https://bioconductor.org/packages/3.12/workflows" 
                                                            CRAN 
"https://packagemanager.rstudio.com/all/__linux__/bionic/latest" 

Make an ARM image available

Hi, would be very cool to have an ARM version also available on DockerHub.

Probably feasible directly within a slightly modified GitHub action.😺

Best,

missing harfbuzz freetype2 fribidi

When installing pkgdown latest version in the RELEASE_3_11 container, I get:

install.packages("pkgdown")
sing PKG_CFLAGS=
Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the harfbuzz freetype2 fribidi library. Try installing:
 * deb: libharfbuzz-dev libfribidi-dev (Debian, Ubuntu, etc)
 * rpm: harfbuzz-devel fribidi-devel (Fedora, EPEL)
 * csw: libharfbuzz_dev libfribidi_dev (Solaris)
 * brew: harfbuzz fribidi (OSX)
If harfbuzz freetype2 fribidi is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a harfbuzz freetype2 fribidi.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: hb-ft.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘textshaping’
* removing ‘/usr/local/lib/R/host-site-library/textshaping’
Bioconductor version 3.11 (BiocManager 1.30.10), ?BiocManager::install for help
Bioconductor version '3.11' is out-of-date; the current release version '3.12'
  is available with R version '4.0'; see https://bioconductor.org/install
ERROR: dependency ‘textshaping’ is not available for package ‘ragg’
* removing ‘/usr/local/lib/R/host-site-library/ragg’
Bioconductor version 3.11 (BiocManager 1.30.10), ?BiocManager::install for help
Bioconductor version '3.11' is out-of-date; the current release version '3.12'
  is available with R version '4.0'; see https://bioconductor.org/install
ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’
* removing ‘/usr/local/lib/R/host-site-library/pkgdown’

I can install a previous version, 1.5.1, that did not depend on ragg/textshaping. Like so:

install.packages("https://cran.r-project.org/src/contrib/Archive/pkgdown/pkgdown_1.5.1.tar.gz"

So apparently the bioconductor container is missing a library (harfbuzz freetype2 fribidi), which would be required to install pkgdown 1.6.0. So, not sure if you want to add lots of libraries, but given that pkgdown is a fairly widely used package I'd think having all the C libraries it depends on would be nice to users.

Issue with the stringi package in RELEASE_3_16

Describe the bug
There seems to be a problem with the stringi package which comes preinstalled in the RELEASE_3_16 image. It fails to load the libicui18n.so system library and then crashes.

To Reproduce

docker run -it bioconductor/bioconductor_docker:RELEASE_3_16 Rscript -e 'library(stringi)'

which leads to:

Error: package or namespace load failed for ‘stringi’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so':
  libicui18n.so.66: cannot open shared object file: No such file or directory
Execution halted

Expected behavior
Loading the stringi package

Additional context
To me this looks like maybe the image is shipping with a binary of the package that was built for another version of Ubuntu, but I don't know enough about how the images are built to know if that's actually possible.

You can see examples of the issue affecting GitHub works flows that use the container at https://github.com/steveped/ngsReports/actions/runs/3436636334/jobs/5730384311

Strange issue running image fedora 36 vs 37 - rocker/rstudio::devel works, as does home build

I have just switched my base OS from Fedora 36 to 37 and encountered the following:

  1. When executing

      podman run \
        -d \
        -p 127.0.0.1:8787:8787 \
        -v /tmp:/tmp \
        -e ROOT=TRUE   \
        -e DISABLE_AUTH=TRUE \
        docker.io/bioconductor/bioconductor_docker
    

    the container comes up fine, but using a browser, the RStudio server instance can't be reached. The spinner shows up, but then:

    Could not connect to the R session on RStudio server.
    Unable to connect to service (1)

  2. When doing the same thing using docker.io/rocker/rstudio:devel, the base image to the bioconductor one, all is fine.

  3. Additionally all is fine when I build the bioconductor image locally...

I have been unable to debug this. Does anyone have any insight into why Fedora 37 might bulk at the BC image from dockerhub (and all containers that are based on it and still around from before the 36/37 switch).

'binary' package shared objects are not compatible with the docker container

With this

root@8fc4afe31c40:/# env|grep BIOC
BIOCONDUCTOR_VERSION=3.17
BIOCONDUCTOR_USE_CONTAINER_REPOSITORY=FALSE
BIOCONDUCTOR_NAME=bioconductor_docker
BIOCONDUCTOR_DOCKER_VERSION=3.17.34

The following shows a binary package (S4Vectors) being installed, but then failing to load; the 'missing' S4Vectors.so exists, but I guess is the wrong format for this architecture -- was it built on this image?

root@0e07810d4143:/# export BIOCONDUCTOR_USE_CONTAINER_REPOSITORY=TRUE
root@0e07810d4143:/# Rscript -e "BiocManager::install('S4Vectors'); library(S4Vectors)"
'getOption("repos")' replaces Bioconductor standard repositories, see
'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://packagemanager.posit.co/cran/latest
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing package(s) 'S4Vectors'
also installing the dependency ‘BiocGenerics’

trying URL 'https://bioconductor.org/packages/3.17/container-binaries/bioconductor_docker/src/contrib/BiocGenerics_0.46.0_R_x86_64-pc-linux-gnu.tar.gz'
Content type 'application/gzip' length 599777 bytes (585 KB)
==================================================
downloaded 585 KB

trying URL 'https://bioconductor.org/packages/3.17/container-binaries/bioconductor_docker/src/contrib/S4Vectors_0.38.1_R_x86_64-pc-linux-gnu.tar.gz'
Content type 'application/gzip' length 2478027 bytes (2.4 MB)
==================================================
downloaded 2.4 MB

* installing *binary* package ‘BiocGenerics’ ...
* DONE (BiocGenerics)
* installing *binary* package ‘S4Vectors’ ...
* DONE (S4Vectors)
...
Error: package or namespace load failed for ‘S4Vectors’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/S4Vectors/libs/S4Vectors.so':
  /usr/local/lib/R/site-library/S4Vectors/libs/S4Vectors.so: cannot open shared object file: No such file or directory
Execution halted

In contrast, source installations work...

root@0e07810d4143:/# Rscript -e "BiocManager::install('S4Vectors', type = 'source', force = TRUE); library(S4Vectors)"
'getOption("repos")' replaces Bioconductor standard repositories, see
'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://packagemanager.posit.co/cran/latest
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing package(s) 'S4Vectors'
trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/S4Vectors_0.38.1.tar.gz'
Content type 'application/x-gzip' length 838821 bytes (819 KB)
==================================================
downloaded 819 KB

* installing *source* package ‘S4Vectors’ ...
** using staged installation
** libs
using C compiler: ‘gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0’
...
installing to /usr/local/lib/R/site-library/00LOCK-S4Vectors/00new/S4Vectors/libs
...
* DONE (S4Vectors)

The downloaded source packages are in
	‘/tmp/RtmpSPEeF7/downloaded_packages’
Loading required package: stats4
Loading required package: BiocGenerics
...
## success!

I don't understand exactly the details but will note that this is running the (linux) container on an M1 mac...

container defaults to installing packages from source, rather than binary

For instance pulling today I have

root@8fc4afe31c40:/# env|grep BIOC
BIOCONDUCTOR_VERSION=3.17
BIOCONDUCTOR_USE_CONTAINER_REPOSITORY=FALSE
BIOCONDUCTOR_NAME=bioconductor_docker
BIOCONDUCTOR_DOCKER_VERSION=3.17.34

And the BIOCONDUCTOR_USE_CONTAINER_REPOSITORY=FALSE means that we don't use the binaries.

I guess it is that the three (??) times the environment variable is set, e.g., at

ENV BIOCONDUCTOR_USE_CONTAINER_REPOSITORY=FALSE
leaves it in the FALSE state, when really it should be TRUE

Pulling devel images fails: "unauthorized: authentication required"

Describe the bug
I cannot pull the bioconductor_docker:devel image using docker pull bioconductor/bioconductor_docker:devel. The error seems to come from downloading an image with ID d52085ce65a9, as shown below:

devel: Pulling from bioconductor/bioconductor_docker
8f0fdd3eaac0: Pull complete 
b790123422ee: Downloading  197.7MB/223.5MB
803eab9c13c0: Download complete 
c15643914d17: Download complete 
8570f8b54929: Download complete 
09ce5ea9b067: Download complete 
5bfd14a7d591: Download complete 
eac115bfdea4: Download complete 
3bdc87059a7b: Download complete 
1a99a1c01562: Download complete 
b7ad8cf93003: Downloading  128.2MB/617.1MB
d52085ce65a9: Downloading 
8fa74e0ca4a7: Waiting 
198f10ae3101: Waiting 
59fcfd570519: Waiting 
5ae6da472a0d: Waiting 
0cac8a786581: Waiting 
92976b77c83e: Waiting 
unauthorized: authentication required

I am using docker tools on Mac OSX High Sierra.

RELEASE_3_17: *.so shared objects from container_packages in /usr/local/lib/R/site-library packages not loading

Describe the bug

Not a docker expert, so apologies if I did something dumb, but when I tried updating my Dockerfile to latest RELEASE_3_17, couple of dependencies did not load. Reinstalling them with install.packages fixed it. Is it possible that there is an R conflict between the repository BiocManager uses by default?

To Reproduce

Steps to reproduce the behavior:

  1. docker run -it --user rstudio bioconductor/bioconductor_docker:RELEASE_3_17 R
  2. BiocManager::install("matrixStats", force=TRUE)
    'getOption("repos")' replaces Bioconductor standard repositories, see
    'help("repositories", package = "BiocManager")' for details.
    Replacement repositories:
    CRAN: https://packagemanager.posit.co/cran/latest
    Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
    Installing package(s) 'matrixStats'
    trying URL 'https://bioconductor.org/packages/3.17/container-binaries/bioconductor_docker/src/contrib/matrixStats_0.63.0_R_x86_64-pc-linux-gnu.tar.gz'
    Content type 'application/x-tar' length 672206 bytes (656 KB)
    ==================================================
    downloaded 656 KB
  • installing binary package ‘matrixStats’ ...
  • DONE (matrixStats)

The downloaded source packages are in
‘/tmp/RtmpAyOlQO/downloaded_packages’
Old packages: 'xml2'
Update all/some/none? [a/s/n]: n
> library(matrixStats)
Error: package or namespace load failed for ‘matrixStats’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/matrixStats/libs/matrixStats.so':
/usr/local/lib/R/site-library/matrixStats/libs/matrixStats.so: cannot open shared object file: No such file or directory
3. > install.packages("matrixStats")
...
4. > library(matrixStats)

Works.

R/Rstudio version conflict

There's now a version conflict between R and Rstudio in the devel version of the container , which was last pushed 4 days ago.

This results in plots being unable to print, as indicated by the following warning message, which is produced in a variety of situations but in my case occurred when I tried installing a remote repo (remotes::install_github("neurogenomics/MAGMA_Celltyping@bschilder_dev")):

....
In addition: Warning messages:
1: R graphics engine version 15 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed. 

Example Dockerfile:
https://github.com/NathanSkene/EWCE/blob/master/Dockerfile

README continues to mention AnVIL::

At least the first point is out of date?

  • Make Bioconductor package binaries available to all users of the this container. Users can now install Bioconductor packages as binaries by simply doing, AnVIL::install(). This speeds up installation of Bioconductor packages by avoiding compilation.

  • To see the latest status of the Bioconductor binary repository, check with AnVIL:::repository_stats().

Failed bioconductor package installations do not cause docker builds to stop

I've ran into a number of issues trying to install bioconductor packages in a Docker image. Specifically, the two approaches that I've foud for installing bioconductor packages (R -e 'BiocManager::install("package") and /usr/local/lib/R/site-library/littler/examples/installBioc.r) do not raise a non-zero exit code and thus do not cause Docker builds to fail when something goes wrong (e.g. package is unavailable in the repo, mis-spelled name, or missing dependencies).

I've raised this issue over at the rocker repository as well, with a lot more background information (rocker-org/rocker-versioned2#292), but I believe that it would be beneficial to add some warnings or clarification on the intended method to extend the bioconductor images to the documentation provided here: https://www.bioconductor.org/help/docker/

Any other advice or insight into how I can better handle these installations is of course highly appreciated as well.

Cannot install packages with BiocManager::install during docker build

I wrote a Dockerfile to install some packages using bioconductor/bioconductor_docker as base image and built it, but when I use BiocManager::install() to install When I use BiocManager::install() to install bioconductor packages, I get an error.

BiocManager::install('multtest', update = F)
Error: Bioconductor version cannot be validated; no internet connection? See
#troubleshooting section in vignette
In addition: Warning messages:
1: In file(con, "r") :
URL 'https://bioconductor.org/config.yaml': status was 'Couldn't resolve host name'
2: In file(con, "r") :
URL 'http://bioconductor.org/config.yaml': status was 'Couldn't resolve host name'
Execution halted

On the other hand, install.packages() installs the packages successfully.

When I did a build a few months ago using the same base image, I did not get this error.

FROM bioconductor/bioconductor_docker:RELEASE_3_16
FROM bioconductor/bioconductor_docker:RELEASE_3_17
FROM bioconductor/bioconductor_docker:RELEASE_3_18

They all have the same error.

I use Docker Engine installed on wsl2 (Ubuntu on Win).

Any call to `ggplot2` in the current `bioconductor_docker:devel` image makes `R`/`Rstuido` **CRASH**

Describe the bug
With the current bioconductor_docker:devel image a call to ggplot2 out of the box crashes R/RStudio with an error like this:

29 Apr 2021 12:10:12 [rsession-rstudio] ERROR session hadabend; LOGGED FROM: rstudio::core::Error {anonymous}::rInit(const rstudio::r::session::RInitInfo&) src/cpp/session/SessionMain.cpp:680

Upon plotting, the R console freezes and crashes with above error upon entering Return.

To Reproduce
Steps to reproduce the behavior:

  1. docker pull bioconductor/bioconductor_docker:devel

  2. Call

     docker run -d \
       -p 127.0.0.1:8787:8787 \
       -v /tmp:/tmp \
       -e ROOT=TRUE \
       -e DISABLE_AUTH=TRUE \
       bioconductor/bioconductor_docker:devel
    
  3. Use a browser and navigate to localhost:8787.

  4. In the R cosole install ggplot2 with BiocManager::install("ggplot2", update = FALSE) - UPDATING OTHER R PACKAGES DOES NOT HELP

  5. Run the following (derived from ?ggplot2::ggplot) - DO NOT SOURCE, but step through script (Shift+ Return):

     library(ggplot2)
     df <- data.frame(gp = factor(rep(letters[1:3], each = 10)), y = rnorm(30))
     ds <- do.call(rbind, lapply(split(df, df$gp), function(d) {
       data.frame(mean = mean(d$y), sd = sd(d$y), gp = d$gp)
     }))
     ggplot(df, aes(gp, y)) +
       geom_point() +
       geom_point(data = ds, aes(y = mean), colour = 'red', size = 3)
    

Expected behavior
Plot to appear

Desktop (please complete the following information):

  • OS: Manjaro testing
  • Browser chromium
  • Version Chromium 90.0.4430.93 Arch Linux

Errors with release 3.16

The docker image has the following issues when I run the commands within the container:

  • Command: R

    • error message:
      OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 8: Operation not permitted
      OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
  • Command: apt-get update

    • error message:
      Reading package lists... Done
      E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/.deb /var/cache/apt/archives/partial/.deb /var/cache/apt/*.bin || true'
      E: Sub-process returned an error code

Environment:

  • BIOCONDUCTOR_DOCKER_VERSION : 3.16.31
  • My host system: 18.04.1-Ubuntu

Please advise how to address the above issues.

Unable to start container process: exec: "/init": stat /init: no such file or directory: unknown

Describe the bug
Using the last versions (RELEASE_3.18, RELEASE_3.17 or just latest) of images r-ver, bioconductor_docker, tidyverse... I am not able to start the container because I get an error related to the init command (see screenshot).

This error comes when trying docker-compose with:

services:
  bioc:
    container_name: tidyverse_bioc3.18
    image: "bioconductor/tidyverse:RELEASE_3_18"
  ports:
      - "8787:8787"
     .
     .
     .

Screenshots

image

If I try to create an image based on one of those image, with FROM command in Dockerfile, then I get the error in VSCode:
image

Desktop (please complete the following information):

  • OS: Ubuntu 22.04

Issue running my bioc docker using volumes

volume was created and used with previous version of bioc container (bioconductor/release_core2:R3.6.0_Bioc3.9)

When I change my docker from bioconductor/release_core2:R3.6.0_Bioc3.9 to bioconductor/bioconductor_docker:RELEASE_3_10, build my image and then try and run my image the run command seems to hang for a long time. After a few minutes it starts spitting out the following error messages for my files:
chown: changing ownership of '/home/bioc/data/gsva_randomizations_GDC_subset_origoverlap/SYNDECAN-3-MEDIATED SIGNALING EVENTS%PATHWAY INTERACTION DATABASE NCI-NATURE CURATED DATA%SYNDECAN-3-MEDIATED SIGNALING EVENTS.txt': Input/output error

The run command that I am using:
docker run -e PASSWORD=password --rm -p 8787:8787 -v /path/to/largeish/directory/created/with/previous/bioc/container:/home/bioc --add-host "localhost:###.###.###.###" em_base_image

My docker image is available on docker hub
https://hub.docker.com/repository/docker/risserlin/em_base_image

Error in .install_repos, argument "force" is missing, with no default

Describe the bug
Execution halts building during the run of install.R with the following output.

> install.packages("BiocManager", repos="https://cran.rstudio.com")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/BiocManager_1.30.15.tar.gz'
Content type 'application/x-gzip' length 262210 bytes (256 KB)
==================================================
downloaded 256 KB

* installing *source* package ‘BiocManager’ ...
** package ‘BiocManager’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BiocManager)
> 
> BiocManager::install(version="3.14", update=TRUE, ask=FALSE)

The downloaded source packages are in
	‘/tmp/Rtmp8mPtpK/downloaded_packages’
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://packagemanager.rstudio.com/all/__linux__/focal/latest

Bioconductor version 3.14 (BiocManager 1.30.15), R 4.1.0 (2021-05-18)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/BiocVersion_3.14.0.tar.gz'
Content type 'application/x-gzip' length 969 bytes
==================================================
downloaded 969 bytes

* installing *source* package ‘BiocVersion’ ...
** using staged installation
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BiocVersion)

The downloaded source packages are in
	‘/tmp/Rtmp8mPtpK/downloaded_packages’
Error in .install_repos(pkgs, old_pkgs, instPkgs = instPkgs, lib = lib,  : 
  argument "force" is missing, with no default
Calls: <Anonymous> ... .install -> .install_repos -> .install_filter_up_to_date
Execution halted
The command '/bin/sh -c R -f /tmp/install.R' returned a non-zero code: 1

To Reproduce
docker build --no-cache -t bioconductor_docker:devel .

Expected behavior
I expect the build to complete without issue.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Additional context
I know this is an issue with BiocManager, but I was able to build the docker earlier this week. Please let me know if I should report it there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.