Skip to content

Commit

Permalink
Merge pull request #27 from czi-catalystproject/episode-3-exercises
Browse files Browse the repository at this point in the history
Add Episode 3 exercises after review
  • Loading branch information
jnywong authored Feb 14, 2024
2 parents 46874f0 + 79da49d commit ca06781
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/deploy_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# paths:
# - path/to/subfolder
# Trigger the workflow manually
workflow_dispatch:
workflow_dispatch:

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
Expand Down Expand Up @@ -45,7 +45,10 @@ jobs:
# path: _build/.jupyter_cache
# key: jupyter-book-cache-${{ hashFiles('requirements.txt') }}

#
# Update exercise in episodes/manage_images.md with latest handbook-authoring-image tag
- name: Run helper script
run: |
./helper.sh ${{ secrets.QUAY_ROBOT }}
# Build the book in English
- name: Build the book in English
Expand Down
55 changes: 49 additions & 6 deletions episodes/manage_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,67 @@ Objectives

## Exercises

::::{dropdown} Specifying a custom image tag.
::::{dropdown} Software Challenges
:open:

Think about the challenges that you may have faced with using software for your work.

- Is there a tool that you wanted to use that was not compatible with your operating system?
- Have you ever struggled to install a piece of software?
- Did you and your collaborators fail to reproduce results using the same software application?

Write up your thoughts in our shared collaborative document.

::::

::::{dropdown} Reasons to use containers
:open:

Which of the following statements are *True* or *False*?

1. Containers are lightweight, portable and isolated units of software that can be used on any computer and operating system.

1. An image is a runnable, self-contained software environment and created from a container. A container is a shareable "recipe" used to create images.

1. A container enables reproducible modelling or analyses to be carried out on your laptop or in the cloud.

1. Containers are easily scalable and can be deployed on many machines to distribute work.

:::{dropdown} Solution

1. *True*

1. *False* – A *container* is a runnable, self-contained software environment or service and created from an *image*. An *image* is a shareable "recipe" used to create *containers*.

1. *True*

1. *True*

:::

::::

::::{dropdown} Specifying a custom image tag
:open:

Which of the following would you paste into the _Custom Image_ field to add the latest version of the `handbook-authoring-image` image to your hub?

<!-- IMPORTANT: If you are editing this exercise, please do not change the "LATEST" placeholders below as they are automatically updated with the latest tag using the helper.sh script in the GitHub action .github/workflows/deploy_website.yml -->

1. quay.io/2i2c/handbook-authoring-image:bbe4225a7940
1. quay.io/2i2c/handbook-authoring-image
1. docker pull quay.io/2i2c/handbook-authoring-image:ad18f6ea575d
1. quay.io/2i2c/handbook-authoring-image:ad18f6ea575d

1. docker pull quay.io/2i2c/handbook-authoring-image:LATEST
1. quay.io/2i2c/handbook-authoring-image:LATEST

:::{dropdown} Solution
4. quay.io/2i2c/handbook-authoring-image:ad18f6ea575d
4. quay.io/2i2c/handbook-authoring-image:LATEST

Notes on the other answers:

1. This is using an older version tag and not the latest version.
1. This is using an older version tag and not the latest version available.
2. This is missing the version tag.
3. Need to remove the 'docker pull' part.
3. Here you would need to remove the 'docker pull' part.
:::

::::
Expand Down
5 changes: 5 additions & 0 deletions helper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# Helper shell script to update exercise in episodes/manage_images.md with the latest handbook-authoring-image tag.

FILE=${PWD}"/episodes/manage_images.md"
sed -i 's/LATEST/'$1'/g' $FILE

0 comments on commit ca06781

Please sign in to comment.