YeoLab / containers

Collection of Dockerfiles
0 stars 1 forks source link

Build from hub version 2.0.2 #1

Closed rpwagner closed 2 years ago

rpwagner commented 2 years ago

@byee4 can you try changing this line https://github.com/YeoLab/containers/blob/d3db2f53b95f6e8c469c543b1bbe9a765283d113/images/seurat/4.1.0/Dockerfile#L3

to this:

FROM jupyter/datascience-notebook:hub-2.0.2

This will match the JupyterHub version that's running. Thanks

When you've pushed the new image to brianyee/seurat:latest I'll retest launching it.

byee4 commented 2 years ago

@rpwagner sure- https://github.com/YeoLab/containers/commit/1970fab5d9421a24320b2f1519d5fcd358259a24

rpwagner commented 2 years ago

It's still failing to launch, which is odd. The artMS notebook is built from the same base image. I saw that you've got r-seurat=4.1.0 in the list of conda packages, plus you're running the install in R

RUN Rscript -e 'IRkernel::installspec(name = "seurat-4.1.0", displayname = "seurat-4.1.0", user = FALSE)'

Could those be conflicting?

byee4 commented 2 years ago

I don't think so. The Rscript -e "IRkernel..." isn't installing Seurat but rather the kernel that points to Seurat. r-seurat=4.1.0 should be where Seurat is installed. What is the error?

rpwagner commented 2 years ago

@byee4 I had a chance to troubleshoot this today. First, you can test the Seurat Notebook option on the JupyterHub site. All the packages--except seurat-data--should be available in an R notebook. No idea why that package is causing the user's container to crash. It hasn't been updated in a while, so it could have a conflict somewhere.

Also, the kernel spec call was causing a crash. There shouldn't be a need for that, since the R kernel is already installed and all the packages are available to it.

Here's the final Dockerfile for comparison. The image is on Docker Hub

################## BASE IMAGE ######################

FROM jupyter/datascience-notebook:hub-2.0.2

################## METADATA ######################

LABEL base_image="jupyter/datascience-notebook:hub-2.0.2"
LABEL version="1"
LABEL software="seurat"
LABEL software.version="4.1.0"
LABEL about.summary="R toolkit for single cell genomics"
LABEL about.url="www.satijalab.org/seurat"
LABEL about.license="MIT"
LABEL about.license_file="https://satijalab.org/seurat/license"
LABEL about.publication="https://doi.org/10.1016/j.cell.2021.04.048"
LABEL about.tags="Genomics"

USER root

COPY apt-packages.txt /tmp/apt-packages.txt
COPY conda-packages.txt /tmp/conda-packages.txt

# Update image, install additional distro packages
RUN apt-get update && xargs apt-get install -y < /tmp/apt-packages.txt

# Install additional R packages from conda-forge using mamba
RUN mamba install -y -c bioconda -c conda-forge --file /tmp/conda-packages.txt

RUN Rscript -e 'install.packages("devtools", repos = "http://cran.us.r-project.org")'
RUN Rscript -e 'devtools::install_github("mojaveazure/seurat-disk")'

USER $NB_UID
byee4 commented 2 years ago

Ah, noted. I've updated our Dockerfile to match this one here. https://github.com/YeoLab/containers/commit/a378db4230eb5ab5f3ff69640f27eac3f497cf83

Thanks!