Skip to content

Commit 528b5c2

Browse files
Minor fixes to Part 5
1 parent 05b8a44 commit 528b5c2

File tree

1 file changed

+50
-30
lines changed

1 file changed

+50
-30
lines changed

docs/hello_nextflow/05_hello_containers.md

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The `'<container>'` part is the URI address of the container image.
8686
As an example, let's pull a container image that contains [cowpy](https://github.com/jeffbuttars/cowpy), a python implementation of a tool called `cowsay` that generates ASCII art to display arbitrary text inputs in a fun way.
8787

8888
There are various repositories where you can find published containers.
89-
We used the [Seqera Containers](https://seqera.io/containers/) service to generate this Docker container from the `cowpy` Conda package: `'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273'`.
89+
We used the [Seqera Containers](https://seqera.io/containers/) service to generate this Docker container image from the `cowpy` Conda package: `'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273'`.
9090

9191
Run the complete pull command:
9292

@@ -163,7 +163,7 @@ You can also run a container interactively, which gives you a shell prompt insid
163163

164164
#### 1.3.1. Spin up the container
165165

166-
To run interactively, we just add `-it` to the `docker pull` command.
166+
To run interactively, we just add `-it` to the `docker run` command.
167167
Optionally, we can specify the shell we want to use inside the container by appending _e.g._ `/bin/bash` to the command.
168168

169169
```bash
@@ -200,7 +200,7 @@ For example, the tool documentation says we can change the character ('cowacter'
200200
cowpy "Hello Containers" -c tux
201201
```
202202

203-
Now the output shows the Linux penguin, Tux, instead of the default cow, because we specified `-c tux` parameter.
203+
Now the output shows the Linux penguin, Tux, instead of the default cow, because we specified the `-c tux` parameter.
204204

205205
```console title="Output"
206206
__________________
@@ -250,7 +250,7 @@ One way to do this is to **mount** a **volume** from the host system into the co
250250
-v <outside_path>:<inside_path>
251251
```
252252

253-
In our case `<outside_path>` will be the current working directory, so we can just use a dot (`.`), and `<outside_path>` is just a name we make up; let's call it `/data`.
253+
In our case `<outside_path>` will be the current working directory, so we can just use a dot (`.`), and `<inside_path>` is just a name we make up; let's call it `/data`.
254254

255255
To mount a volume, we replace the paths and add the volume mounting argument to the docker run command as follows:
256256

@@ -265,6 +265,7 @@ You can check that it works by listing the contents of `/data`:
265265
```bash
266266
ls /data
267267
```
268+
Depending on what part of this training you've done before, the output below my look slightly different.
268269

269270
```console title="Output"
270271
demo-params.json hello-channels.nf hello-workflow.nf modules results
@@ -290,11 +291,11 @@ cat /data/greetings.csv | cowpy -c turkey
290291
This produces the desired ASCII art of a turkey rattling off our example greetings:
291292

292293
```console title="Output"
293-
_________
294-
/ HOLà \
295-
| HELLO |
296-
\ BONJOUR /
297-
---------
294+
_________
295+
/ Hello \
296+
| Bonjour |
297+
\ Holà /
298+
---------
298299
\ ,+*^^*+___+++_
299300
\ ,*^^^^ )
300301
\ _+* ^**+_
@@ -502,6 +503,21 @@ ERROR ~ Error executing process > 'cowpy'
502503

503504
Caused by:
504505
Process `cowpy` terminated with an error exit status (127)
506+
507+
Command executed:
508+
509+
cat COLLECTED-test-batch-output.txt | cowpy -c "turkey" > cowpy-COLLECTED-test-batch-output.txt
510+
511+
Command exit status:
512+
127
513+
514+
Command output:
515+
(empty)
516+
517+
Command error:
518+
.command.sh: line 2: cowpy: command not found
519+
520+
(trimmed output)
505521
```
506522

507523
This error code, `error exit status (127)` means the executable we asked for was not found.
@@ -530,7 +546,6 @@ _After:_
530546
process cowpy {
531547
532548
publishDir 'containers/results', mode: 'copy'
533-
534549
container 'community.wave.seqera.io/library/cowpy:1.1.5--3db457ae1977a273'
535550
```
536551

@@ -590,27 +605,32 @@ There were 3 greetings in this batch
590605
You can find the cowpy'ed output in the `results` directory.
591606

592607
```console title="results/cowpy-COLLECTED-test-batch-output.txt"
593-
_______
594-
/ \
608+
_________
609+
/ HOLà \
595610
| HELLO |
596-
| HOLà |
597-
| BONJOUR |
598-
\ /
599-
=======
600-
\
601-
\
602-
\
603-
\
604-
,.
605-
(_|,.
606-
,' /, )_______ _
607-
__j o``-' `.'-)'
608-
(") \'
609-
`-j |
610-
`-._( /
611-
|_\ |--^. /
612-
/_]'|_| /_)_/
613-
/_]' /_]'
611+
\ BONJOUR /
612+
---------
613+
\ ,+*^^*+___+++_
614+
\ ,*^^^^ )
615+
\ _+* ^**+_
616+
\ +^ _ _++*+_+++_, )
617+
_+^^*+_ ( ,+*^ ^ \+_ )
618+
{ ) ( ,( ,_+--+--, ^) ^\
619+
{ (\@) } f ,( ,+-^ __*_*_ ^^\_ ^\ )
620+
{:;-/ (_+*-+^^^^^+*+*<_ _++_)_ ) ) /
621+
( / ( ( ,___ ^*+_+* ) < < \
622+
U _/ ) *--< ) ^\-----++__) ) ) )
623+
( ) _(^)^^)) ) )\^^^^^))^*+/ / /
624+
( / (_))_^)) ) ) ))^^^^^))^^^)__/ +^^
625+
( ,/ (^))^)) ) ) ))^^^^^^^))^^) _)
626+
*+__+* (_))^) ) ) ))^^^^^^))^^^^^)____*^
627+
\ \_)^)_)) ))^^^^^^^^^^))^^^^)
628+
(_ ^\__^^^^^^^^^^^^))^^^^^^^)
629+
^\___ ^\__^^^^^^))^^^^^^^^)\\
630+
^^^^^\uuu/^^\uuu/^^^^\^\^\^\^\^\^\^\
631+
___) >____) >___ ^\_\_\_\_\_\_\)
632+
^^^//\\_^^//\\_^ ^(\_\_\_\)
633+
^^^ ^^ ^^^ ^
614634
```
615635

616636
You see that the character is saying all the greetings, just as it did when we ran the `cowpy` command on the `greetings.csv` file from inside the container.

0 commit comments

Comments
 (0)