Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing files for docker container building #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions docker/.bashrc_docker
Original file line number Diff line number Diff line change
@@ -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'
10 changes: 10 additions & 0 deletions docker/.profile_docker
Original file line number Diff line number Diff line change
@@ -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
19 changes: 10 additions & 9 deletions Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -64,3 +64,4 @@ COPY .bashrc_docker /root/.bashrc
COPY .profile_docker /root/.profile

RUN apt-get clean -y && apt-get autoremove -y

22 changes: 22 additions & 0 deletions docker/python-packages.txt
Original file line number Diff line number Diff line change
@@ -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