forked from CBroz1/spyglass-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Docker_hub.Dockerfile
40 lines (33 loc) · 1.09 KB
/
Docker_hub.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
FROM quay.io/jupyter/base-notebook
USER root
# copy dj config, ensure user owned
RUN mkdir -p ${HOME}/.jupyter
COPY config/.datajoint_config.json ${HOME}/.datajoint_config.json
COPY config/jupyter_server_config.py ${HOME}/.jupyter/jupyter_server_config.py
RUN chown ${NB_UID} \
${HOME}/.datajoint_config.json \
${HOME}/.jupyter/jupyter_server_config.py
# Install git for convenience and others for position pipeline
RUN apt-get update \
&& apt-get install -y \
git \
ffmpeg \
libsm6 \
libxext6 \
build-essential \
g++ \
libgl1 \
libglib2.0-0 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER ${NB_UID}
# Install conda env if not already present
ARG PAPER_ID
COPY export_files/environment.yml /environment.yml
RUN conda update conda -y \
&& conda init bash \
&& mamba env create -f /environment.yml \
&& echo "conda activate ${PAPER_ID}" >> ~/.bashrc
ENV PATH=/opt/conda/envs/${PAPER_ID}/bin:$PATH
ADD --chown=${NB_UID}:${NB_GID} notebooks ${HOME}/notebooks/
RUN python -m ipykernel install --user --name ${PAPER_ID} --display-name "Python (${PAPER_ID})"