-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.server
61 lines (48 loc) · 2.18 KB
/
Dockerfile.server
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
53
54
55
56
57
58
59
60
61
FROM jupyter/datascience-notebook:hub-3.1.1
# Switch to root user to install tools to build islets and to run bioformats JVM
USER root
RUN apt update --yes && \
apt upgrade --yes
# Install binaries to install and execute the islets module
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
build-essential \
git \
bat \
default-jdk && \
apt clean
# Switch back to the default user as we do not need root rights anymore and don't want to give them to the user.
USER ${NB_UID}
# Make bat accessible to the user
RUN mkdir -p ~/.local/bin
RUN ln -s /usr/bin/batcat ~/.local/bin/bat
# Upgrade pip and install ffmpeg and tiff dependencies
RUN pip install --upgrade --no-cache pip && \
pip install --upgrade --no-cache ffmpeg tifffile black isort
# Install graph-tool
RUN conda install -c conda-forge graph-tool
# Install JupyterDash, the corresponding proxy to stream webapps, and needed labextension
RUN pip install --upgrade --no-cache \
dash jupyter-dash jupyter-server-proxy \
jupyterlab-drawio jupyter-archive jupyter-resource-usage jupyterlab-spreadsheet-editor \
jupyterlab-code-formatter jupyterlab-system-monitor jupyterlab_templates
RUN jupyter labextension install jupyterlab-plotly
RUN jupyter lab build
RUN echo "c.JupyterLabTemplates.template_dirs = ['/data/useful/templates']" >> ${HOME}/.jupyter/jupyter_notebook_config.py
RUN echo "c.JupyterLabTemplates.include_default = False" >> ${HOME}/.jupyter/jupyter_notebook_config.py
# Switch to root user to install tools to build islets and to run bioformats JVM
USER root
# Install the islets module
COPY . /opt/islets/Physio_Ca/
WORKDIR /opt/islets/Physio_Ca/
RUN pip install .
RUN chmod +x /opt/islets/Physio_Ca/scripts/full_process.py
# Create a directory to copy the islets source into it.
# The directory will have fixed permissions.
RUN /usr/local/bin/fix-permissions /opt/islets/
RUN chown -R ${NB_UID}:users ${HOME}
# Switch back to the default user as we do not need root rights anymore and don't want to give them to the user.
USER ${NB_UID}
# Link to data and set the home directory as default work directory
WORKDIR ${HOME}/work
RUN ln -s /data ${HOME}/work/local_data