-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (43 loc) · 2.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# base image maintained by the NVIDIA CUDA Installer Team - https://hub.docker.com/r/nvidia/cuda/
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
LABEL version="0.04"
LABEL maintainer="Vitalii Kleshchevnikov <[email protected]>"
LABEL description="High-throughput spatial mapping of cell types."
# install os packages
RUN apt-get update \
&& apt-get install --no-install-recommends --yes \
curl \
unzip \
g++ \
vim \
wget \
ca-certificates \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# see http://bugs.python.org/issue19846
ENV LANG C.UTF-8
# install miniconda3 - https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/index.html
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh \
&& /bin/bash /tmp/miniconda.sh -b -p /opt/conda \
&& rm /tmp/miniconda.sh
RUN /opt/conda/condabin/conda init bash
# create conda environment yaml file
COPY environment.yml /tmp/
RUN /opt/conda/condabin/conda env create -f /tmp/environment.yml \
&& echo "source activate cellpymc" >> ~/.bashrc \
&& /opt/conda/condabin/conda clean --all --yes --quiet
ENV PATH /opt/conda/envs/cellpymc/bin:/opt/conda/bin:$PATH
# install cell2location and add cellpymc kernel for jupyter environment and
RUN /bin/bash -c "pip install git+https://github.com/BayraktarLab/cell2location.git"
RUN /bin/bash -c "pip install --upgrade numpyro jax==0.2.3 jaxlib==0.1.56+cuda102 -f https://storage.googleapis.com/jax-releases/jax_releases.html"
RUN /bin/bash -c "python -m ipykernel install --prefix=/opt/conda/envs/cellpymc/ --name=cellpymc --display-name='Container (cellpymc)'"
# copy notebooks to the image
COPY docs/notebooks notebooks
RUN /bin/bash -c "jupyter trust /notebooks/*.ipynb";
# launch jupyter
CMD ["jupyter", "notebook", \
"--notebook-dir=/notebooks", \
"--NotebookApp.token='cell2loc'", \
"--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]
EXPOSE 8888