Skip to content

Commit e424796

Browse files
authored
Merge pull request #19 from BIOP/update_desktop
biop-desktop to 0.1.0
2 parents ffa1ecb + 5557980 commit e424796

23 files changed

Lines changed: 501 additions & 65 deletions

docker/Dockerfile-base

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,24 @@ RUN mkdir -p /home/biop/Desktop && chown -R biop:biop /home/biop/Desktop \
107107
&& chown -R biop:biop /home/biop \
108108
&& chmod -R a+rwx /home/biop/
109109

110-
111110
#################################################################
112111
# Install Inkscape
113112
RUN sudo apt-get update -y \
114113
&& sudo apt-get install inkscape -y
115114

116115

116+
#################################################################
117+
# OpenCL for clij ...
118+
RUN apt-get update \
119+
&& apt-get install -y nvidia-opencl-dev \
120+
&& apt remove -y libnvidia-compute-550-server \
121+
&& apt-get autoremove --purge \
122+
&& apt-get clean \
123+
&& rm -rf /var/lib/apt/lists/* \
124+
&& rm -rf /tmp/* \
125+
&& find /var/log -type f -exec cp /dev/null \{\} \;
126+
127+
#################################################################
117128
RUN chown -R biop:biop /home/biop/ \
118129
&& chmod -R a+rwx /home/biop/
119130

docker/Dockerfile-ms

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
ARG BASE_IMAGE=0.0.3
1+
ARG BASE_IMAGE=0.1.0
22

33
ARG ALIAS=biop/
44

55
# because COPY --from= doesn't support build-arg (https://github.com/docker/for-mac/issues/2155)
66
# we can still do a list of all sub-blocks here to be able to use them in the COPY --from=... below
77
# base needs to be last, Don't Ask Wky ! (I don't know) ! and it seems it need to be named 'base' , D.A:W.2 ! but it works !
8-
ARG QUPATH_VERSION=v0.5.1
8+
ARG QUPATH_VERSION=v0.5.1-01
99
ARG ILASTIK_VERSION=1.4.0-gpu
10-
ARG FIJI_VERSION=20240325
10+
ARG FIJI_VERSION=20240429
1111
ARG CELLPOSE_VERSION=2.2.2
1212
ARG DEVBIO_VERSION=0.10.1
1313
ARG SAMAPI_VERSION=0.4.0
14-
ARG EM_VERSION=0.2.3
14+
ARG EM_VERSION=1.1.0
1515
ARG STARDIST_VERSION=0.8.5
16-
ARG ABBA_VERSION=0.8.0
16+
ARG ABBA_VERSION=0.8.0-01
1717
ARG CELLPROFILER_VERSION=4.2.6
1818
ARG INKSCAPE_VERSION=0.0.1
19-
ARG OMNI_VERSION=1.0.7-dev
19+
ARG OMNI_VERSION=1.0.7-dev2
20+
ARG BRAINRENDER_VERSION=0.0.3
2021

2122
FROM ${ALIAS}biop-qupath:${QUPATH_VERSION} as qupath-image
2223
FROM ${ALIAS}biop-ilastik:${ILASTIK_VERSION} as ilastik-image
@@ -29,7 +30,8 @@ FROM ${ALIAS}biop-stardist:${STARDIST_VERSION} as stardist-image
2930
FROM ${ALIAS}biop-abba:${ABBA_VERSION} as abba-image
3031
FROM ${ALIAS}biop-cellprofiler:${CELLPROFILER_VERSION} as cellprofiler-image
3132
FROM ${ALIAS}biop-inkscape:${INKSCAPE_VERSION} as inkscape-image
32-
FROm ${ALIAS}biop-omnipose:${OMNI_VERSION} as omnipose-image
33+
FROM ${ALIAS}biop-omni:${OMNI_VERSION} as omnipose-image
34+
FROM ${ALIAS}biop-brainrender:${BRAINRENDER_VERSION} as brainrender-image
3335

3436
FROM ${ALIAS}biop-vnc-base:${BASE_IMAGE} as base
3537

@@ -163,8 +165,17 @@ COPY fiji/Fiji_setWrappersPaths.groovy /home/biop/tmp/Fiji_setWrappersPaths.groo
163165
RUN chown -R biop:biop /home/biop/tmp \
164166
&& chmod -R a+rwX /home/biop/tmp
165167

168+
# add brainrender-napari env
169+
COPY --from=brainrender-image /opt/conda/envs/brainrender /opt/conda/envs/brainrender
170+
166171
USER biop
167172
RUN /opt/Fiji.app/ImageJ-linux64 --headless --run /home/biop/tmp/Fiji_setWrappersPaths.groovy
173+
174+
# download allen_mouse_25um atlas from brainrender-napari
175+
RUN source activate brainrender \
176+
&& brainglobe install -a allen_mouse_25um \
177+
&& conda deactivate
178+
168179
USER root
169180
RUN rm -rf /home/biop/tmp
170181

@@ -195,21 +206,6 @@ COPY --from=omnipose-image /opt/conda/envs/omnipose/ /opt/conda/envs/omnipose/
195206
# To make the different conda env available in jupyter
196207
COPY jupyter/kernels/ /home/biop/.local/share/jupyter/kernels/
197208

198-
199-
#################################################################
200-
# # Install OpenCL ( for clij ... )
201-
# Doesn't work (anymore) on local WSL2 but works on runai !!!
202-
# see https://github.com/NVIDIA/nvidia-container-toolkit/issues/371
203-
# We move at the end so that we can build a normal version and WSL one without it, as it is not supported anyway.
204-
RUN apt-get update \
205-
&& apt-get install -y nvidia-opencl-dev \
206-
&& apt remove -y libnvidia-compute-545 \
207-
&& apt-get autoremove --purge \
208-
&& apt-get clean \
209-
&& rm -rf /var/lib/apt/lists/* \
210-
&& rm -rf /tmp/* \
211-
&& find /var/log -type f -exec cp /dev/null \{\} \;
212-
213209
#################################################################
214210
# final chown and chmod
215211
RUN chown -R biop:biop /home/biop/ \

docker/QuPath/Dockerfile-qupath

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ RUN chown -R biop:biop /opt/QuPath/QuPath_Common_Data_0.5 \
4242
&& chmod -R a+rwx /opt/QuPath/QuPath_Common_Data_0.5
4343

4444
# # TODO : discuss if we prepare unzip from zenodo, or if we update when container start via a git pull ... (less good for reproducibility but better to keep scripts up-to-date)
45-
RUN wget -q https://zenodo.org/records/10869324/files/QuPath_Common_Data_0.5.zip?download=1 -O ${TEMP_DIR}/QuPath_Common_Data_0.5.zip
45+
RUN wget -q https://zenodo.org/records/11091309/files/QuPath_Common_Data_0.5.zip?download=1 -O ${TEMP_DIR}/QuPath_Common_Data_0.5.zip
4646
RUN unzip ${TEMP_DIR}/QuPath_Common_Data_0.5.zip -d /opt/QuPath/QuPath_Common_Data_0.5 \
4747
&& rm ${TEMP_DIR}/QuPath_Common_Data_0.5.zip
4848

49-
49+
5050

5151
# # Prepare to set QP_prefs
5252
COPY QuPath/QuPath_setPaths.groovy /home/biop/tmp/QuPath_setPaths.groovy

docker/abba/Dockerfile-abba

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-23-07.html
22
#FROM superelastix/elastix:5.0.1 as elastix-image
3-
ARG QUPATH_VERSION=v0.5.1
4-
ARG FIJI_VERSION=20240325
3+
ARG QUPATH_VERSION=v0.5.1-01
4+
ARG FIJI_VERSION=20240429
55
ARG DEEPSLICE_VERSION=1.1.5
6+
ARG BRAINRENDER_VERSION=0.0.3
67
ARG ALIAS=biop/
78

89
FROM ${ALIAS}biop-qupath:${QUPATH_VERSION} as qupath-image
910
FROM ${ALIAS}biop-fiji:${FIJI_VERSION} as fiji-image
1011
FROM ${ALIAS}biop-deepslice:${DEEPSLICE_VERSION} as deepslice-image
12+
FROM ${ALIAS}biop-brainrender:${BRAINRENDER_VERSION} as brainrender-image
1113

1214
FROM ${ALIAS}biop-vnc-base:0.0.3 as base
1315

@@ -137,6 +139,27 @@ RUN printf '[Desktop Entry]\nVersion=0.8.0\nName=ABBA\nGenericName=ABBA\nX-GNOM
137139
RUN chown -R biop:biop /opt/Fiji.app/ \
138140
&& chmod -R a+rwX /opt/Fiji.app/
139141

142+
# install brainrender
143+
COPY --from=brainrender-image /opt/conda/envs/brainrender /opt/conda/envs/brainrender
144+
145+
146+
USER biop
147+
148+
# adds brainrender kernel
149+
RUN source activate brainrender \
150+
&& python -m ipykernel install --user --name brainrender --display-name "Python (brainrender)" \
151+
&& conda deactivate
152+
153+
# download allen_mouse_25um atlas
154+
RUN source activate brainrender \
155+
&& brainglobe install -a allen_mouse_25um \
156+
&& conda deactivate
157+
158+
USER root
159+
160+
RUN chmod -R a+rwX /home/biop/ \
161+
&& chown -R biop:biop /home/biop/
162+
140163
#################################################################
141164
# Container start
142165
USER biop

docker/brainrender/Dockerfile-brainrender

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_IMAGE=0.0.3
1+
ARG BASE_IMAGE=0.1.0
22
ARG ALIAS=biop/
33
FROM ${ALIAS}biop-vnc-base:${BASE_IMAGE}
44

@@ -13,10 +13,12 @@ RUN conda env update -n brainrender -f /tmp/env_brainrender.yml \
1313

1414
USER biop
1515

16+
# adds brainrender kernel
1617
RUN source activate brainrender \
1718
&& python -m ipykernel install --user --name brainrender --display-name "Python (brainrender)" \
1819
&& conda deactivate
1920

21+
# download allen_mouse_25um atlas
2022
RUN source activate brainrender \
2123
&& brainglobe install -a allen_mouse_25um \
2224
&& conda deactivate
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "devbio"
1+
name: "brainrender-napari"
22
channels:
33
- conda-forge
44
dependencies:
@@ -7,5 +7,6 @@ dependencies:
77
- pyqt
88
- pip
99
- pip :
10-
- brainrender-napari
11-
prefix: "/opt/conda/envs/devbio"
10+
- brainrender-napari==0.0.3
11+
- bg-atlasapi
12+
prefix: "/opt/conda/envs/brainrender-napari"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
ARG BASE_IMAGE=0.0.3
2+
ARG ALIAS=biop/
3+
4+
5+
FROM ${ALIAS}biop-vnc-base:${BASE_IMAGE}
6+
7+
8+
USER root
9+
10+
# install celldetection and download models ( https://celldetection.readthedocs.io/en/latest/models.html )
11+
COPY celldetection/env_celldetection.yml /tmp/env_celldetection.yml
12+
RUN conda env update -n celldetection -f /tmp/env_celldetection.yml \
13+
&& conda clean --all -f -y \
14+
&& conda env export -n "biop" \
15+
&& rm /tmp/env_celldetection.yml
16+
17+
# get model
18+
RUN mkdir -p /home/biop/.cache/torch/hub/checkpoints/
19+
RUN wget https://celldetection.org/torch/models/ginoro_CpnResNeXt101UNet-fbe875f1a3e5ce2c.pt -O /home/biop/.cache/torch/hub/checkpoints/ginoro_CpnResNeXt101UNet-fbe875f1a3e5ce2c.pt
20+
RUN wget https://celldetection.org/torch/models/.pt -O /home/biop/.cache/torch/hub/checkpoints/.pt
21+
22+
RUN mkdir -p /home/biop/celldetection/ \
23+
&& chown -R biop:biop /home/biop/ \
24+
&& chmod -R a+rwX /home/biop/
25+
26+
COPY celldetection/start_celldetection.sh /opt/celldetection/start_celldetection.sh
27+
COPY napari/napari-icon.ico /opt/celldetection/napari-icon.ico
28+
29+
RUN printf '[Desktop Entry]\nVersion=0.0.1\nName=celldetection\nGenericName=celldetection\nX-GNOME-FullName=celldetection\nComment=Scientific Image Analysis\nType=Application\nCategories=Education;Science;ImageProcessing;\nExec=/opt/celldetection/start_celldetection.sh\nTryExec==/opt/celldetection/start_celldetection.sh\nTerminal=true\nStartupNotify=true\nMimeType=image/*;\nIcon=/opt/celldetection/napari-icon.ico\nStartupWMClass=celldetection\n' > /home/biop/Desktop/celldetection.desktop \
30+
&& chown -R biop:biop /home/biop \
31+
&& chmod +x /home/biop/Desktop/celldetection.desktop
32+
33+
34+
RUN chmod -R a+rwX /home/biop/ \
35+
&& chown -R biop:biop /home/biop/
36+
37+
#################################################################
38+
# Container start
39+
USER biop
40+
WORKDIR /home/biop
41+
ENTRYPOINT ["/usr/local/bin/jupyter"]
42+
CMD ["lab", "--allow-root", "--ip=*", "--port=8888", "--no-browser", "--NotebookApp.token=''", "--NotebookApp.allow_origin='*'", "--notebook-dir=/home/biop"]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "celldetection"
2+
channels:
3+
- pytorch
4+
- nvidia
5+
- conda-forge
6+
- defaults
7+
dependencies:
8+
- python=3.9
9+
- pytorch
10+
- pyqt
11+
- napari
12+
- torchvision
13+
- pytorch-cuda=11.8
14+
- pip
15+
- pip :
16+
- celldetection
17+
- git+https://github.com/FZJ-INM1-BDA/celldetection-napari.git
18+
- ipykernel
19+
prefix: "/opt/conda/envs/celldetection"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source activate celldetection
2+
napari
3+
$ read -rsp $'Press enter to continue...\n'
4+
Press enter to continue...

docker/empanada/Dockerfile-empanada

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
ARG BASE_IMAGE=0.0.1
2-
FROM biop-vnc-base:${BASE_IMAGE}
1+
ARG BASE_IMAGE=0.0.3
2+
ARG ALIAS=biop/
3+
FROM ${ALIAS}biop-vnc-base:${BASE_IMAGE} as base
34
#ARG DEBIO_VERSION=0.10.1
45
#FROM biop-devbio:${DEBIO_VERSION} as base
56

0 commit comments

Comments
 (0)