Skip to content

Commit

Permalink
Add docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzamuto committed Jan 25, 2021
1 parent f4810d5 commit a2cde82
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ clean:

test:
python -m unittest discover

docker: clean wheel docker-image

docker-image:
docker build -t zetastitcher -f docker/Dockerfile dist
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ sudo apt-get install cython3 python3-numpy
sudo pip3 install zetastitcher
```

## Docker image
To build a docker image with ZetaStitcher:
```
make docker
```
You can call the stitching commands using an ephemeral container like this:
```
docker run -it -v`pwd`:/home --rm zetastitcher stitch-align -h
docker run -it -v`pwd`:/home --rm zetastitcher stitch-fuse -h
```

## Documentation
Please read the documentation and follow the tutorial at this page:<br/>
https://lens-biophotonics.github.io/ZetaStitcher/
Expand Down
22 changes: 22 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.8-slim

WORKDIR /home

COPY *.whl /home/

RUN set -ex \
\
&& apt-get update && apt-get install -y --no-install-recommends libopenjp2-7 libgl1 \
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get install -y --no-install-recommends gcc g++ \
\
&& pip install dcimg *.whl \
&& stitch-align -h > /dev/null && stitch-fuse -h > /dev/null \
&& rm -fr *.whl /root/.cache/pip \
\
&& apt-mark auto '.*' > /dev/null \
&& apt-mark manual $savedAptMark \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

CMD ["stitch-align"]

0 comments on commit a2cde82

Please sign in to comment.