Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions analyses/cell-type-neuroblastoma-04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ LABEL org.opencontainers.image.source="https://github.com/AlexsLemonade/OpenScPC
# Set an environment variable to allow checking if we are in an OpenScPCA container
ENV OPENSCPCA_DOCKER=TRUE


# Disable the renv cache to install packages directly into the R library
ENV RENV_CONFIG_CACHE_ENABLED=FALSE
# Install Basilisk python packages in the system library
ARG BASILISK_USE_SYSTEM_DIR=1

# set a name for the conda environment
ARG ENV_NAME=openscpca-cell-type-neuroblastoma-04
Expand Down Expand Up @@ -78,11 +81,5 @@ RUN Rscript -e 'renv::restore()' && \
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.utils::cleanConda()"

# Set CMD to bash to activate the environment for any commands
CMD ["/bin/bash"]
8 changes: 2 additions & 6 deletions analyses/cell-type-wilms-tumor-06/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ENV OPENSCPCA_DOCKER=TRUE

# Disable the renv cache to install packages directly into the R library
ENV RENV_CONFIG_CACHE_ENABLED=FALSE
# Install Basilisk python packages in the system library
ARG BASILISK_USE_SYSTEM_DIR=1

# Install renv
RUN Rscript -e 'install.packages("renv")'
Expand All @@ -29,9 +31,3 @@ 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
RUN Rscript -e "proc <- basilisk::basiliskStart(env = zellkonverter::zellkonverterAnnDataEnv(), testload = 'anndata'); \
basilisk::basiliskStop(proc); \
basilisk.utils::cleanConda()"
28 changes: 12 additions & 16 deletions analyses/doublet-detection/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ ARG ENV_NAME=openscpca-doublet-detection
# Set an environment variable to allow checking if we are in an OpenScPCA container
ENV OPENSCPCA_DOCKER=TRUE

# Disable the renv cache to install packages directly into the R library
ENV RENV_CONFIG_CACHE_ENABLED=FALSE
# Install Basilisk python packages in the system library
ARG BASILISK_USE_SYSTEM_DIR=1

# set environment variables to install conda
ENV PATH="/opt/conda/bin:${PATH}"

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

# Install conda via miniforge
# adapted from https://github.com/conda-forge/miniforge-images/blob/master/ubuntu/Dockerfile
RUN curl -L "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -o /tmp/miniforge.sh \
Expand All @@ -33,19 +45,9 @@ RUN ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh \
RUN conda install --channel=conda-forge --name=base conda-lock \
&& conda clean --all --yes

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

# Install renv
RUN Rscript -e "install.packages('renv')"

# Disable the renv cache to install packages directly into the R library
ENV RENV_CONFIG_CACHE_ENABLED=FALSE

# Copy conda lock file to image
COPY conda-lock.yml conda-lock.yml

Expand All @@ -68,11 +70,5 @@ RUN Rscript -e 'renv::restore()' \
&& 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.utils::cleanConda()"

# Set CMD to bash to activate the environment when launching
CMD ["/bin/bash"]
10 changes: 4 additions & 6 deletions analyses/simulate-sce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ RUN conda-lock install -n ${ENV_NAME} conda-lock.yml \
# Activate conda environment on bash launch
RUN echo "conda activate ${ENV_NAME}" >> ~/.bashrc

# Disable the renv cache to install packages directly into the R library
ENV RENV_CONFIG_CACHE_ENABLED=FALSE
# Install Basilisk python packages in the system library
ARG BASILISK_USE_SYSTEM_DIR=1

RUN Rscript -e "install.packages(c('remotes', 'renv'))"

WORKDIR /usr/local/renv
Expand All @@ -54,12 +58,6 @@ RUN Rscript -e "renv::restore()" && \
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)"



# set final workdir for commands
WORKDIR /home