diff --git a/docker-rbioconductor/Dockerfile b/docker-rbioconductor/Dockerfile index 0eccab7..c0f04be 100644 --- a/docker-rbioconductor/Dockerfile +++ b/docker-rbioconductor/Dockerfile @@ -4,9 +4,6 @@ FROM rocker/r-ver:4.4.0 # Copy installBioc.r script RUN cp /usr/local/lib/R/site-library/littler/examples/installBioc.r /usr/local/bin/installBioc.r -# Install BiocManager -RUN Rscript -e "install.packages('BiocManager')" - # Install system dependencies RUN apt-get update && apt-get -y install \ less \ @@ -21,17 +18,25 @@ RUN apt-get update && apt-get -y install \ libxt6 \ libglpk-dev \ libmysqlclient21 \ - libcurl4-openssl-dev \ - python3 \ - python3-pip && \ + libcurl4-openssl-dev && \ apt-get clean # Install Bioconductor packages RUN R -e "install.packages('BiocManager'); BiocManager::install(version = '3.19')" # Install required R and Bioconductor packages -RUN R -e "install.packages(c('argparse', 'data.table', 'tidyverse', 'dplyr','vcfR')); \ - BiocManager::install(c('HDF5Array', 'bsseq', 'DSS', 'GenomicRanges', 'IRanges', 'methylKit'))" +RUN R -e "install.packages(c('argparse', 'data.table', 'dplyr', 'tidyverse', 'vcfR'))" +RUN R -e "BiocManager::install(c('HDF5Array', 'bsseq', 'DSS', 'GenomicRanges', 'IRanges', 'methylKit'))" + +ARG MAMBA_VERSION="24.3.0-0" + +ENV CONDA_DIR /opt/conda +COPY env/*.yml /tmp/ +RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Miniforge3-$(uname)-$(uname -m).sh" && \ + bash Miniforge3-$(uname)-$(uname -m).sh -f -b -p /opt/conda && \ + rm -f Miniforge3-$(uname)-$(uname -m).sh && \ + $CONDA_DIR/bin/mamba install -y -f /tmp/basic-tools.yml && \ + $CONDA_DIR/bin/conda clean -y --all # Entry point for the container CMD ["bash"] \ No newline at end of file diff --git a/docker-rbioconductor/env/basic-tools.yml b/docker-rbioconductor/env/basic-tools.yml new file mode 100644 index 0000000..2747c39 --- /dev/null +++ b/docker-rbioconductor/env/basic-tools.yml @@ -0,0 +1,41 @@ +name: basic-tools +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - python + - ipykernel + - pandas + - numpy + - matplotlib + - seaborn + - pybedtools + - bedtools + - bcftools + - htslib + - samtools + - tabulate + - deeptools + - pip + - adjustText + - Jinja2 + - openpyxl + - scikit-misc + - scikit-learn + - zlib + - pip: + - polars + - pyranges + - diptest + - gtfparse + - lets-plot + - openai + - langchain-openai + - jupyter-ai[all] + - python-docx + - shiny + - figeno + - pypandoc_binary + - cairosvg + - rpy2 diff --git a/docker-rbioconductor/scripts/conda_soft_links.sh b/docker-rbioconductor/scripts/conda_soft_links.sh new file mode 100644 index 0000000..148ea7a --- /dev/null +++ b/docker-rbioconductor/scripts/conda_soft_links.sh @@ -0,0 +1,10 @@ +# this loop to avoid overiding any existing soft-linked binary +link_path=$1 +for file in `ls $link_path` ; do + if [ -f /usr/local/bin/$file ] + then + : + else + ln -s ${link_path}/$file /usr/local/bin/$file + fi +done \ No newline at end of file