Mercurial > hg > orthanc-book
comparison Sphinx/source/users/docker.rst @ 1075:d2be251975d1 Orthanc-1.12.4
Orthanc 1.12.4
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Jun 2024 20:18:43 +0200 |
parents | 60b0b7ea409b |
children | 567de375e89f |
comparison
equal
deleted
inserted
replaced
1074:32ac45058512 | 1075:d2be251975d1 |
---|---|
70 $ docker pull jodogne/orthanc | 70 $ docker pull jodogne/orthanc |
71 | 71 |
72 If more stability is required, you can select the official release of | 72 If more stability is required, you can select the official release of |
73 Orthanc to be run:: | 73 Orthanc to be run:: |
74 | 74 |
75 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.12.3 | 75 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.12.4 |
76 | 76 |
77 Passing additional command-line options (e.g. to make Orthanc verbose) | 77 Passing additional command-line options (e.g. to make Orthanc verbose) |
78 can be done as follows (note the ``/etc/orthanc`` option that is | 78 can be done as follows (note the ``/etc/orthanc`` option that is |
79 required for Orthanc to find its configuration files):: | 79 required for Orthanc to find its configuration files):: |
80 | 80 |
81 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.12.3 /etc/orthanc --verbose | 81 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.12.4 /etc/orthanc --verbose |
82 | 82 |
83 | 83 |
84 Usage, with plugins enabled | 84 Usage, with plugins enabled |
85 --------------------------- | 85 --------------------------- |
86 | 86 |
92 | 92 |
93 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins | 93 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins |
94 | 94 |
95 Or you can also start a specific version of Orthanc for more stability:: | 95 Or you can also start a specific version of Orthanc for more stability:: |
96 | 96 |
97 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins:1.12.3 | 97 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-plugins:1.12.4 |
98 | 98 |
99 If you have an interest in the :ref:`Python plugin <python-plugin>`, | 99 If you have an interest in the :ref:`Python plugin <python-plugin>`, |
100 you can use the ``orthanc-python`` image. The latter image is a | 100 you can use the ``orthanc-python`` image. The latter image is a |
101 heavier version of the ``orthanc-plugins`` image, as it embeds the | 101 heavier version of the ``orthanc-plugins`` image, as it embeds the |
102 Python 3.7 interpreter. Here is how to start this image:: | 102 Python 3.7 interpreter. Here is how to start this image:: |
103 | 103 |
104 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python | 104 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python |
105 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python:1.12.3 | 105 $ docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc-python:1.12.4 |
106 | 106 |
107 | 107 |
108 Fine-tuning the configuration | 108 Fine-tuning the configuration |
109 ----------------------------- | 109 ----------------------------- |
110 | 110 |
114 need to fine-tune other parameters, notably the list of the DICOM | 114 need to fine-tune other parameters, notably the list of the DICOM |
115 modalities Orthanc knows about. | 115 modalities Orthanc knows about. |
116 | 116 |
117 You can generate a custom configuration file for Orthanc as follows:: | 117 You can generate a custom configuration file for Orthanc as follows:: |
118 | 118 |
119 $ docker run --rm --entrypoint=cat jodogne/orthanc:1.12.3 /etc/orthanc/orthanc.json > /tmp/orthanc.json | 119 $ docker run --rm --entrypoint=cat jodogne/orthanc:1.12.4 /etc/orthanc/orthanc.json > /tmp/orthanc.json |
120 | 120 |
121 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart | 121 Then, edit the just-generated file ``/tmp/orthanc.json`` and restart |
122 Orthanc with your updated configuration:: | 122 Orthanc with your updated configuration:: |
123 | 123 |
124 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc:1.12.3 | 124 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc:1.12.4 |
125 | 125 |
126 *Remark:* These Docker images automatically set the environment | 126 *Remark:* These Docker images automatically set the environment |
127 variable ``MALLOC_ARENA_MAX`` to ``5`` in order to :ref:`control | 127 variable ``MALLOC_ARENA_MAX`` to ``5`` in order to :ref:`control |
128 memory usage <scalability-memory>`. This default setting can be | 128 memory usage <scalability-memory>`. This default setting can be |
129 overriden by providing the option ``-e MALLOC_ARENA_MAX=1`` when | 129 overriden by providing the option ``-e MALLOC_ARENA_MAX=1`` when |
152 the `YAML file format <https://en.wikipedia.org/wiki/YAML>`__):: | 152 the `YAML file format <https://en.wikipedia.org/wiki/YAML>`__):: |
153 | 153 |
154 version: '3.1' # Secrets are only available since this version of Docker Compose | 154 version: '3.1' # Secrets are only available since this version of Docker Compose |
155 services: | 155 services: |
156 orthanc: | 156 orthanc: |
157 image: jodogne/orthanc-plugins:1.12.3 | 157 image: jodogne/orthanc-plugins:1.12.4 |
158 command: /run/secrets/ # Path to the configuration files (stored as secrets) | 158 command: /run/secrets/ # Path to the configuration files (stored as secrets) |
159 ports: | 159 ports: |
160 - 4242:4242 | 160 - 4242:4242 |
161 - 8042:8042 | 161 - 8042:8042 |
162 secrets: | 162 secrets: |
201 deleted once the container stops). You can make the Orthanc database | 201 deleted once the container stops). You can make the Orthanc database |
202 persistent by mapping the ``/var/lib/orthanc/db`` folder of the | 202 persistent by mapping the ``/var/lib/orthanc/db`` folder of the |
203 container to some path in the filesystem of your Linux host, e.g.:: | 203 container to some path in the filesystem of your Linux host, e.g.:: |
204 | 204 |
205 $ mkdir /tmp/orthanc-db | 205 $ mkdir /tmp/orthanc-db |
206 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.12.3 | 206 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc-db/:/var/lib/orthanc/db/ jodogne/orthanc:1.12.4 |
207 | 207 |
208 | 208 |
209 Whole-slide imaging support | 209 Whole-slide imaging support |
210 --------------------------- | 210 --------------------------- |
211 | 211 |
212 The ``orthanc-plugins`` image includes support for :ref:`microscopic | 212 The ``orthanc-plugins`` image includes support for :ref:`microscopic |
213 whole-slide imaging (WSI) <wsi>`. For instance, the following command | 213 whole-slide imaging (WSI) <wsi>`. For instance, the following command |
214 will start the WSI viewer plugin transparently together with Orthanc:: | 214 will start the WSI viewer plugin transparently together with Orthanc:: |
215 | 215 |
216 $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins:1.12.3 | 216 $ docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc-wsi jodogne/orthanc-plugins:1.12.4 |
217 | 217 |
218 Note that we gave the name ``orthanc-wsi`` to this new Docker | 218 Note that we gave the name ``orthanc-wsi`` to this new Docker |
219 container. Then, the Dicomizer command-line tool can be invoked as | 219 container. Then, the Dicomizer command-line tool can be invoked as |
220 follows:: | 220 follows:: |
221 | 221 |
222 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.tif:/tmp/Source.tif:ro jodogne/orthanc-plugins:1.12.3 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ /tmp/Source.tif | 222 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.tif:/tmp/Source.tif:ro jodogne/orthanc-plugins:1.12.4 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ /tmp/Source.tif |
223 | 223 |
224 This command needs a few explanations: | 224 This command needs a few explanations: |
225 | 225 |
226 * ``--link=orthanc-wsi:orthanc`` links the container running the | 226 * ``--link=orthanc-wsi:orthanc`` links the container running the |
227 Dicomizer, to the Docker container running Orthanc that we started | 227 Dicomizer, to the Docker container running Orthanc that we started |
245 | 245 |
246 If you have a source image that is not a hierarchical TIFF, you must | 246 If you have a source image that is not a hierarchical TIFF, you must |
247 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__ | 247 instruct the Dicomizer to use `OpenSlide <https://openslide.org/>`__ |
248 to decode it by adding the ``--openslide`` option:: | 248 to decode it by adding the ``--openslide`` option:: |
249 | 249 |
250 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.svs:/tmp/Source.svs:ro jodogne/orthanc-plugins:1.12.3 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ --openslide=libopenslide.so /tmp/Source.svs | 250 $ docker run -t -i --rm --link=orthanc-wsi:orthanc --entrypoint=OrthancWSIDicomizer -v /tmp/Source.svs:/tmp/Source.svs:ro jodogne/orthanc-plugins:1.12.4 --username=orthanc --password=orthanc --orthanc=http://orthanc:8042/ --openslide=libopenslide.so /tmp/Source.svs |
251 | 251 |
252 | 252 |
253 PostgreSQL and Orthanc inside Docker | 253 PostgreSQL and Orthanc inside Docker |
254 ------------------------------------ | 254 ------------------------------------ |
255 | 255 |
266 retrieve the IP and the port of the PostgreSQL container, together | 266 retrieve the IP and the port of the PostgreSQL container, together |
267 with the default Orthanc configuration file:: | 267 with the default Orthanc configuration file:: |
268 | 268 |
269 $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres | 269 $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' some-postgres |
270 $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres | 270 $ docker inspect --format '{{ .NetworkSettings.Ports }}' some-postgres |
271 $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins:1.12.3 /etc/orthanc/orthanc.json > /tmp/orthanc.json | 271 $ docker run --rm --entrypoint=cat jodogne/orthanc-plugins:1.12.4 /etc/orthanc/orthanc.json > /tmp/orthanc.json |
272 | 272 |
273 .. highlight:: text | 273 .. highlight:: text |
274 | 274 |
275 Add the following section to ``/tmp/orthanc.json`` (adapting the | 275 Add the following section to ``/tmp/orthanc.json`` (adapting the |
276 values Host and Port to what docker inspect said above):: | 276 values Host and Port to what docker inspect said above):: |
287 | 287 |
288 .. highlight:: bash | 288 .. highlight:: bash |
289 | 289 |
290 Finally, you can start Orthanc:: | 290 Finally, you can start Orthanc:: |
291 | 291 |
292 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins:1.12.3 | 292 $ docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins:1.12.4 |
293 | 293 |
294 | 294 |
295 Debugging | 295 Debugging |
296 --------- | 296 --------- |
297 | 297 |
298 .. highlight:: text | 298 .. highlight:: text |
299 | 299 |
300 For debugging purpose, you can start an interactive bash session as | 300 For debugging purpose, you can start an interactive bash session as |
301 follows:: | 301 follows:: |
302 | 302 |
303 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc:1.12.3 | 303 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc:1.12.4 |
304 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins:1.12.3 | 304 $ docker run -i -t --rm --entrypoint=bash jodogne/orthanc-plugins:1.12.4 |