Skip to content

Commit 18a608d

Browse files
committed
Merge branch 'docker-bash' into development
2 parents 3398f36 + 2743573 commit 18a608d

5 files changed

Lines changed: 60 additions & 45 deletions

File tree

exomiser-cli/README.md

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,24 @@ ${docker.repository}/exomiser-cli latest f39698e3f36b 53 ye
235235
${docker.repository}/exomiser-cli ${project.version} f39698e3f36b 53 years ago 274 MB
236236
```
237237

238+
### <a id="docker-environment-variables"></a>Docker environment variables
239+
240+
Exomiser will require at least two environment variables to be set. These can be provided using `-e` or `--env`
241+
or by creating a `.env` file.
242+
243+
```shell
244+
# -e EXOMISER_DATA_DIRECTORY=/exomiser-data # This variable is automatically set in the docker image
245+
-e EXOMISER_HG19_DATA_VERSION=2512 \
246+
-e EXOMISER_PHENOTYPE_DATA_VERSION=2512
247+
```
248+
249+
These variables can also be specified in the `application.properties` file which should be made available via a mounted
250+
volume.
251+
252+
```shell
253+
-e SPRING_CONFIG_LOCATION=/path/to/your/application.properties
254+
```
255+
238256
### <a id="working-with-the-distroless-image"></a>Working with the distroless image (no shell)
239257

240258
Distroless images are the default image and come without a shell. These are can be pulled using
@@ -246,24 +264,14 @@ If you choose to run the distroless image use the following command:
246264
docker run -v "/path/to/exomiser-data:/exomiser-data" \
247265
-v "/path/to/exomiser/exomiser-config/:/exomiser" \
248266
-v "/path/to/exomiser/results:/results" \
267+
-e SPRING_CONFIG_LOCATION=/exomiser/application.properties
249268
${docker.repository}/exomiser-cli:${project.version} \
250-
analyse --analysis /exomiser/test-analysis-exome.yml \
251-
--spring.config.location=/exomiser/application.properties
269+
exomiser analyse --analysis /exomiser/examples/preset-exome-analysis-human-only.yml \
270+
--vcf /exomiser/examples/Pfeiffer.vcf.gz --assembly hg19 \
271+
--sample /exomiser/examples/pfeiffer-phenopacket.yml \
272+
--output-directory /results --output-format=PARQUET --output-filename docker-test
252273
```
253274

254-
or using Spring configuration arguments instead of the `application.properties`:
255-
256-
```shell
257-
docker run -v "/path/to/exomiser-data:/exomiser-data" \
258-
-v "/path/to/exomiser/exomiser-config/:/exomiser" \
259-
-v "/path/to/exomiser/results:/results" \
260-
${docker.repository}/exomiser-cli:${project.version} \
261-
analyse --analysis /exomiser/test-analysis-exome.yml \
262-
# minimal requirements for an hg19 exome sample
263-
--exomiser.data-directory=/exomiser-data \
264-
--exomiser.hg19.data-version=${genome.data.version} \
265-
--exomiser.phenotype.data-version=${phenotype.data.version}
266-
```
267275
-----
268276

269277
In both cases, to run the image you will need the standard Exomiser directory layout to mount as separate volumes as in the CLI and
@@ -281,46 +289,44 @@ exomiser.data-directory=/exomiser-data
281289
### <a id="working-with-the-docker-bash-image"></a>Working with the docker bash images
282290

283291
Running the image with the following command will open the shell and create volumes with
284-
links to the exomiser data and connects the results to your local machine. `/results` should be an empty directory,
285-
where Exomiser will write the results into.
286-
292+
links to the exomiser data and connect the results to your local machine. `/results` should be a directory,
293+
where Exomiser will write the results into. The host path `/path/to/exomiser-data` should contain the unpacked data
294+
directories `2512_hg19` and `2512_phenotype`.
287295

288296
```shell
289297
docker run -v "/path/to/exomiser-data:/exomiser-data" \
290298
-v "/path/to/exomiser/exomiser-config/:/exomiser" \
291299
-v "/path/to/exomiser/results:/results" \
292-
${docker.repository}/exomiser-cli:${project.version}-bash
300+
-e EXOMISER_HG19_DATA_VERSION=2512 \
301+
-e EXOMISER_PHENOTYPE_DATA_VERSION=2512 \
302+
-it ${docker.repository}/exomiser-cli:${project.version}-bash
293303
```
294304

295305
Here the contents of `/path/to/exomiser/exomiser-config` is simply the `application.properties` file and the example files
296-
to test all is working correctly.
306+
to test all is working correctly. The `application.properties` file can be omitted if the genomic and phenotype data
307+
versions have been provided as environment variables.
297308

298309
```shell
299310
$ tree /path/to/exomiser/exomiser-config/
300311
exomiser-config/
301312
├── application.properties
302313
├── Pfeiffer.vcf.gz
303314
├── Pfeiffer.vcf.gz.tbi
304-
└── test-analysis-exome.yml
315+
├── pfeiffer-phenopacket.yml
316+
└── preset-exome-analysis-human-only.yml
305317
```
306318

307319
#### Running Exomiser from the bash shell
308-
After running the following commands Exomiser will be started from the containers shell.
320+
321+
The entrypoint for the image is `/bin/bash` and the command to run Exomiser is:
309322

310323
```shell
311-
source enable_exomiser.sh
312-
bash enable_exomiser.sh
313-
exomiser analyse --analysis /exomiser/test-analysis-exome.yml \
314-
--spring.config.location=/exomiser/application.properties
324+
exomiser analyse --analysis /exomiser/examples/preset-exome-analysis-human-only.yml \
325+
--vcf /exomiser/examples/Pfeiffer.vcf.gz --assembly hg19 \
326+
--sample /exomiser/examples/pfeiffer-phenopacket.yml \
327+
--output-directory /results --output-format=PARQUET --output-filename docker-test
315328
```
316329

317-
or using Spring configuration arguments instead of the `application.properties`:
330+
If successful, the results will be written to `/results/docker-test.parquet`.
318331

319-
```shell
320-
exomiser --analysis /exomiser/test-analysis-exome.yml \
321-
# minimal requirements for an hg19 exome sample
322-
--exomiser.data-directory=/exomiser-data \
323-
--exomiser.hg19.data-version=${genome.data.version} \
324-
--exomiser.phenotype.data-version=${phenotype.data.version}
325-
```
326332
-----

exomiser-cli/pom.xml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
<profile>
211211
<id>docker:bash</id>
212212
<properties>
213-
<docker.base.image>eclipse-temurin:25.0.2_10-jre</docker.base.image>
213+
<docker.base.image>eclipse-temurin:25.0.2_10-jre@sha256:ff82c74a630c08b417502c4c18189e62074edbb28eb1f2d31b799ac138c01058</docker.base.image>
214214
</properties>
215215
<build>
216216
<plugins>
@@ -234,11 +234,6 @@
234234
<os>linux</os>
235235
<architecture>arm64</architecture>
236236
</platform>
237-
<!-- No longer provided was this for MacOS? -->
238-
<!-- <platform>-->
239-
<!-- <os>linux</os>-->
240-
<!-- <architecture>arm</architecture>-->
241-
<!-- </platform>-->
242237
<platform>
243238
<os>linux</os>
244239
<architecture>amd64</architecture>
@@ -258,16 +253,26 @@
258253
<entrypoint>
259254
<arg>/bin/bash</arg>
260255
</entrypoint>
256+
<environment>
257+
<EXOMISER_DATA_DIRECTORY>/exomiser-data</EXOMISER_DATA_DIRECTORY>
258+
</environment>
261259
<volumes>
262260
<volume>/exomiser-data</volume>
263261
<volume>/exomiser</volume>
264262
<volume>/results</volume>
265263
</volumes>
266264
</container>
267265
<extraDirectories>
266+
<paths>
267+
<path>
268+
<from>src/main/jib</from>
269+
<into>/usr/local/bin</into>
270+
<includes>exomiser</includes>
271+
</path>
272+
</paths>
268273
<permissions>
269274
<permission>
270-
<file>/entrypoint.sh</file>
275+
<file>/usr/local/bin/exomiser</file>
271276
<mode>755</mode>
272277
</permission>
273278
</permissions>
@@ -320,6 +325,9 @@
320325
</tags>
321326
</to>
322327
<container>
328+
<environment>
329+
<EXOMISER_DATA_DIRECTORY>/exomiser-data</EXOMISER_DATA_DIRECTORY>
330+
</environment>
323331
<volumes>
324332
<volume>/exomiser-data</volume>
325333
<volume>/exomiser</volume>

exomiser-cli/src/main/jib/enable_exomiser.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

exomiser-cli/src/main/jib/exomiser

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
java $JAVA_OPTS -cp @/app/jib-classpath-file @/app/jib-main-class-file "$@"

exomiser-web/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@
184184
</tags>
185185
</to>
186186
<container>
187+
<environment>
188+
<EXOMISER_DATA_DIRECTORY>/exomiser-data</EXOMISER_DATA_DIRECTORY>
189+
</environment>
187190
<volumes>
188191
<volume>/exomiser-data</volume>
189192
<volume>/exomiser</volume>

0 commit comments

Comments
 (0)