Skip to content

Commit 9079485

Browse files
authored
Merge pull request #30 from BIOP/v0.2.1
V0.2.1
2 parents e6a8ce6 + 21c2645 commit 9079485

4 files changed

Lines changed: 67 additions & 8 deletions

File tree

docker/Dockerfile-ms

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG CELLPROFILER_VERSION=4.2.6
1717
ARG INKSCAPE_VERSION=0.1.4
1818
ARG OMNI_VERSION=1.0.7-dev2
1919
ARG BRAINRENDER_VERSION=0.0.7
20+
ARG YOLO_VERSION=8.3.119
2021

2122
FROM ${ALIAS}biop-qupath:${QUPATH_VERSION} AS qupath-image
2223
FROM ${ALIAS}biop-ilastik:${ILASTIK_VERSION} AS ilastik-image
@@ -31,6 +32,7 @@ FROM ${ALIAS}biop-cellprofiler:${CELLPROFILER_VERSION} AS cellprofiler-image
3132
FROM ${ALIAS}biop-inkscape:${INKSCAPE_VERSION} AS inkscape-image
3233
FROM ${ALIAS}biop-omni:${OMNI_VERSION} AS omnipose-image
3334
FROM ${ALIAS}biop-brainrender:${BRAINRENDER_VERSION} AS brainrender-image
35+
FROM ${ALIAS}biop-yolo:${YOLO_VERSION} AS yolo-image
3436

3537
FROM ${ALIAS}biop-vnc-base:${BASE_IMAGE} AS base
3638

@@ -115,6 +117,10 @@ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/elastix/lib
115117
COPY --from=brainrender-image /opt/conda/envs/brainrender /opt/conda/envs/brainrender
116118
COPY --from=brainrender-image /home/biop/.brainglobe/ /home/biop/.brainglobe/
117119

120+
#################################################################
121+
# Install yolo
122+
COPY --from=yolo-image /opt/conda/envs/yolo /opt/conda/envs/yolo
123+
118124
#################################################################
119125
# Jupyter kernels
120126
#

docker/readme.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,35 @@ docker build -f Dockerfile-base -t biop-vnc-base:0.2.2 . --no-cache
1111
## build
1212

1313
```
14-
docker build -f Dockerfile-ms -t biop-desktop:0.2.0 .
14+
docker build -f Dockerfile-ms -t biop-desktop:0.2.1 .
1515
```
1616

1717
## start to test (see below)
1818

1919
```
20-
docker run -it --rm -p 8888:8888 --gpus device=0 --mount src=D:/,target=/home/biop/local,type=bind biop-napari:0.5.6
20+
docker run -it --rm -p 8888:8888 --gpus device=0 --mount src=D:/,target=/home/biop/local,type=bind biop-desktop:0.2.1
2121
```
2222

2323
## To test on RCP cluster
2424
```
25-
docker tag biop-desktop:0.2.0 registry.rcp.epfl.ch/ptbiop/biop-desktop:0.2.0
25+
docker tag biop-desktop:0.2.1 registry.rcp.epfl.ch/ptbiop/biop-desktop:0.2.1
2626
```
2727

2828
```
29-
docker push registry.rcp.epfl.ch/ptbiop/biop-desktop:0.2.0
29+
docker push registry.rcp.epfl.ch/ptbiop/biop-desktop:0.2.1
3030
```
3131

3232
## after testing pass, tag
3333
```
34-
docker tag biop-desktop:0.2.0 biop/biop-desktop:0.2.0
34+
docker tag biop-desktop:0.2.1 biop/biop-desktop:0.2.1
3535
```
3636

3737
## push on dockerhub
3838
```
39-
docker push biop/biop-desktop:0.2.0
39+
docker push biop/biop-desktop:0.2.1
4040
```
4141

42-
# TEST 0.2.0
42+
# TEST 0.2.1
4343
[x] omero-insight
4444
[x] vscode
4545
[x] jupyterlab
@@ -58,4 +58,5 @@ docker push biop/biop-desktop:0.2.0
5858
[x] brainrender starts
5959
[x] brainrender load mouse atlas
6060
[x] cellprofiler starts
61-
[x] ilastik starts
61+
[x] ilastik starts
62+
[x] yolo prediction on blobs

docker/yolo/Dockerfile-yolo

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ARG ALIAS=biop/
2+
ARG BASE_IMAGE=0.2.1
3+
FROM ${ALIAS}biop-vnc-base:${BASE_IMAGE}
4+
5+
USER root
6+
7+
RUN conda create -n yolo python=3.10 \
8+
&& source activate yolo \
9+
&& pip install ultralytics opencv-python numpy \
10+
&& conda clean --all -f -y \
11+
&& conda env export -n "biop"
12+
13+
RUN chmod -R a+rwX /home/biop/ \
14+
&& chown -R biop:biop /home/biop/
15+
16+
#################################################################
17+
# Container start
18+
USER biop
19+
WORKDIR /home/biop
20+
ENTRYPOINT ["/usr/local/bin/jupyter"]
21+
CMD ["lab", "--allow-root", "--ip=*", "--port=8888", "--no-browser", "--NotebookApp.token=''", "--NotebookApp.allow_origin='*'", "--notebook-dir=/home/biop"]

docker/yolo/readme-yolo.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Latest Version
2+
3+
## build
4+
```
5+
docker build -f yolo/Dockerfile-yolo -t biop-yolo:8.3.119 . --no-cache
6+
```
7+
## start to test (see below)
8+
```
9+
docker run -it --rm -p 8888:8888 --gpus device=0 --mount src=D:/,target=/home/biop/local,type=bind biop-yolo:8.3.119
10+
```
11+
12+
## after testing pass, tag
13+
```
14+
docker tag biop-yolo:8.3.119 biop/biop-yolo:8.3.119
15+
```
16+
17+
## push on dockerhub
18+
```
19+
docker push biop/biop-yolo:8.3.119
20+
```
21+
22+
# Test(s)
23+
24+
## yolo on blob
25+
Upload `blobs.jpg` to /home/biop/
26+
27+
```
28+
source activate yolo
29+
yolo task=detect mode=predict model=yolov8n.pt source=blobs.jpg
30+
```
31+

0 commit comments

Comments
 (0)