diff --git a/docker/.bashrc_docker b/docker/.bashrc_docker new file mode 100644 index 0000000..75fa75f --- /dev/null +++ b/docker/.bashrc_docker @@ -0,0 +1,19 @@ +# Manually added .bashrc +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +export USER=root +export LOGNAME=root +export HOME=/root +export PATH=/root/.local/bin:/root/bin:/opt/python/bin:/opt/R/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +export LD_LIBRARY_PATH=/opt/R/lib/R/lib +export SHELL=/bin/bash +export TERM=xterm-256color +export LANG=en_US.UTF-8 + +alias ll='ls -lha --color=auto' +alias jn='jupyter-notebook --no-browser --ip=0.0.0.0 --allow-root /root/host_home' +alias jl='jupyter-lab --no-browser --ip=0.0.0.0 --allow-root /root/host_home' +alias cx='cellxgene launch --host 0.0.0.0 --port 8888' diff --git a/docker/.profile_docker b/docker/.profile_docker new file mode 100644 index 0000000..e10b6fc --- /dev/null +++ b/docker/.profile_docker @@ -0,0 +1,10 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login exists. + +# if running bash, source ~/.bashrc +if [ -n '$BASH_VERSION' ]; then + # include .bashrc if it exists + if [ -f '/root/.bashrc' ]; then + . '/root/.bashrc' + fi +fi diff --git a/Dockerfile b/docker/Dockerfile similarity index 75% rename from Dockerfile rename to docker/Dockerfile index f041cef..6d6836d 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ FROM debian:10 ENV DEBIAN_FRONTEND=noninteractive # Install system libraries required for python and R installations -RUN apt-get update && apt-get install -y --no-install-recommends build-essential apt-utils ca-certificates zlib1g-dev gfortran locales libxml2-dev libcurl4-openssl-dev libssl-dev libzmq3-dev libreadline6-dev xorg-dev libcairo-dev libpango1.0-dev libbz2-dev liblzma-dev libffi-dev libsqlite3-dev nodejs npm +RUN apt-get update && apt-get install -y --no-install-recommends build-essential apt-utils ca-certificates zlib1g-dev gfortran locales libxml2-dev libcurl4-openssl-dev libssl-dev libzmq3-dev libreadline6-dev xorg-dev libcairo-dev libpango1.0-dev libbz2-dev liblzma-dev libffi-dev libsqlite3-dev libopenmpi-dev libhdf5-dev libjpeg-dev libblas-dev liblapack-dev nodejs npm # Install common linux tools RUN apt-get update && apt-get install -y --no-install-recommends wget curl htop less nano vim emacs git @@ -21,7 +21,7 @@ RUN tar xvfz R-3.6.3.tar.gz && rm R-3.6.3.tar.gz WORKDIR /opt/R/R-3.6.3 RUN ./configure --enable-R-shlib --with-cairo --with-libpng --prefix=/opt/R/ -RUN make && make install +RUN make -j 3 && make install WORKDIR /opt/R RUN rm -rf /opt/R/R-3.6.3 @@ -37,22 +37,22 @@ RUN Rscript -e 'writeLines(capture.output(sessionInfo()), "../package_versions_r # Download and compile python from source WORKDIR /opt/python -RUN wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz -RUN tar zxfv Python-3.7.7.tgz && rm Python-3.7.7.tgz +RUN wget https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tgz +RUN tar zxfv Python-3.8.6.tgz && rm Python-3.8.6.tgz -WORKDIR /opt/python/Python-3.7.7 +WORKDIR /opt/python/Python-3.8.6 RUN ./configure --enable-optimizations --with-lto --prefix=/opt/python/ -RUN make && make install +RUN make -j 3 && make install WORKDIR /opt/python -RUN rm -rf /opt/python/Python-3.7.7 +RUN rm -rf /opt/python/Python-3.8.6 RUN ln -s /opt/python/bin/python3 /opt/python/bin/python RUN ln -s /opt/python/bin/pip3 /opt/python/bin/pip ENV PATH="/opt/python/bin:${PATH}" +COPY python-packages.txt /opt/python/python-packages.txt RUN pip install --no-cache-dir -U pip wheel setuptools cmake -RUN pip install --no-cache-dir -U scanpy==1.4.6 python-igraph==0.8.0 louvain==0.6.1 jupyterlab=2.1.0 cellxgene==0.15.0 rpy2==3.2.7 anndata2ri==1.0.2 leidenalg==0.7.0 fa2==0.3.5 MulticoreTSNE==0.1 scvelo==0.1.25 diffxpy==0.7.4 tables==3.5.1 ipywidgets==7.5.1 jupyter_contrib_nbextensions==0.5.1 gprofiler-official==1.0.0 scrublet==0.2.1 xlsxwriter xlrd==1.2.0 tensorflow==2.1.0 tensorflow-probability==0.9.0 -RUN pip install --no-cache-dir git+https://github.com/le-ander/epiScanpy.git +RUN pip install --no-cache-dir -r /opt/python/python-packages.txt RUN jupyter contrib nbextension install --system RUN jupyter nbextension enable --py widgetsnbextension @@ -64,3 +64,4 @@ COPY .bashrc_docker /root/.bashrc COPY .profile_docker /root/.profile RUN apt-get clean -y && apt-get autoremove -y + diff --git a/docker/python-packages.txt b/docker/python-packages.txt new file mode 100644 index 0000000..5d8a988 --- /dev/null +++ b/docker/python-packages.txt @@ -0,0 +1,22 @@ +h5py==2.10 +scanpy[louvain] +jupyterlab +cellxgene +rpy2 +anndata2ri +leidenalg +fa2 +MulticoreTSNE +scvelo +diffxpy +ipywidgets +jupyter_contrib_nbextensions +gprofiler-official +scrublet +xlsxwriter +xlrd +tensorflow +tensorflow-probability +episcanpy +cellrank[krylov] +sfaira