tmuylder
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Containers materials Contributors: Alexander Botzki, Marko Vidak, Mateusz Kuzak, Geert van Geest, Pedro Fernandes ## Persona 1 ### Learner's profiles - Who are they? - Researcher / RSE who wants to reuse others analysis / pipeline / software which has been containerised. - people that have recently discovered that they have to work more reproducibly (aiming at automation, mass processing) - people realise that others cannot reproduce their analysis (installation, dependencies, testing, example) - Tweak existing container recipes <!-- - mybinder / Jupyter / docker file - go from images to dockers - people have heard of it and what to use it because they want to use pipeline - people who want to reuse others’ software which have been containerized. --> - What challenges are they facing? - Hard to understand the concept of docker vs conda environments - They don’t know how to use or run containers, how to troubleshoot issues with running them. - They need to develop Docker images locally - Use singularity for deployment - HPC - command line / production pipeline <!-- - The incomplete documentation of containers they would like to use. - aiming at automation for mass processing --> - How will the lesson/workshop help them? - Being able to run a basic container from a registry - Understand that containers do not solve the problem of correctness of analyses - Create isolated environment / share image after tinkering a live images - Understand documentation of docker recipes ### Learner's objectives - Prerequisites for the course/tutorial - basic command line experience - Understand concepts of ‘system admin, installation’, depending on the background - Define exercises with learning outcomes (measurable)* - check whether docker is properly setup (docker run hello-world) - Participants are able to check whether their environment is running - running a container with docker run, outcomes: - Participant can run a container from dockerhub - tagging - run a command - process listing - pruning/cleaning - attached + interactive mode (-it) - detached mode - running web services, mapping ports - volumes, bind-mounts - parameters (working dir, user) - dockerfiles - handling permissions *Goals: “After following one of these tutorials, learners will be able to …” - Blooms taxonomy: ### Training materials Outline: - intermediate example, not covered by the Carpentries lesson: running a Jupyter notebook - Find a image from docker hub containing bwa (ex: https://hub.docker.com/r/biocontainers/bwa) - Exercise: Align reads in file `x.fastq.gz` to reference genome `y.fa` using this container with the latest BWA version from dockerhub, write the alignments to `aln-pe.sam` file: `bwa mem ref.fa read1.fq read2.fq > aln-pe.sam` - in analogy : `docker run --rm --name fastqc_albot -u="$(id -u):$(id -g)" -w="/data/" -v ~/workshop-janssen/data/:/data quay.io/biocontainers/fastqc:0.11.9--0 /bin/bash -c "fastqc WT*.fq.gz" ` ## Persona 2 - Who are they? - Researcher / RSE who wants to make their analysis / pipeline / software more reusable and reproducible. - People that want to create Docker containers or Singularity images - What challenges are they facing? - They have challenges to understand containers conceptually. - Current documentation from Docker/Singularity is not for beginners - How will the lesson/workshop help them? - Make sure their documentation is clear and complete. - Give a template on which they can build further ### Learner's objectives - Prerequisites for the course/tutorial - knowledge on command line in UNIX - know how to change permission/ working directory - package managers - use git - account on docker hub - understanding a Python script - Define exercises with learning outcomes (measurable)* - fetch script from git repo - write a Dockerfile which will create an image with a specific version of [tool] build from source with resolved dependencies, other can run this as command line tool with the parameters provided on CLI - put it on Docker Hub - requires specific python dependencies - default command and entrypoint *Goals: “After following one of these tutorials, learners will be able to …” - Blooms taxonomy: ### Training materials Use [Carpentries Docker lesson](https://carpentries-incubator.github.io/docker-introduction/) as a starting point ```sh docker run \ --rm \ --name fastqc0119 \ -u="$(id -u):$(id -g)" \ -w="/data/" \ --mount type=bind,source=~/workshop-janssen/data/,target=/data \ quay.io/biocontainers/fastqc:0.11.9--0 \ fastqc WT1.fq.gz ``` Outline: executing bioinformatics tool on local file - exercise - download example files from s3 or anywhere else - specific to Linux / MacOS behaves differently - `docker run --rm -u="$(id -u)" quay.io/biocontainers/fastqc:0.11.9--0 touch examplefile` - default owner of Linux is 'root' - explain user and group ID - see [Geert's course](https://sib-swiss.github.io/containers-introduction-training/course_material/managing_docker/#mounting-a-directory) - introduce user option - `docker run --rm -u="$(id -u)" quay.io/biocontainers/fastqc:0.11.9--0 touch file1` - `docker run --rm -u="$(id -u):$(id -g)" quay.io/biocontainers/fastqc:0.11.9--0 touch file2` - learn how to know where the working directory of the image is - default is '/' - `docker inspect quay.io/biocontainers/fastqc:0.11.9--0 | grep 'WorkingDir'` - or `docker run --rm -it quay.io/biocontainers/fastqc:0.11.9--0` - ` inside the container: pwd'` - https://docs.docker.com/engine/reference/run - comment on entrypoint/cmd - introduce working directory option -w - we recommand to use full command e.g. `fastqc W1.fq.qz` Outline: executing bioinformatics tool on local files - Dockerfile: alpine, bwa, resolve dependencies, ... - two person exercise: - image on docker hub - produce a visualisation which is exported to png - write a Dockerfile which will create an image with a specific version of [tool] build from source with resolved dependencies, other can run this as command line tool with the parameters provided on CLI - put it on Docker Hub - requires specific python dependencies - default command and entrypoint Outline: containerize something, container Dockerfile - exercises - fetch script from git repo - write a Dockerfile which will create an image with a specific version of [tool] build from source with resolved dependencies, other can run this as command line tool with the parameters provided on CLI - put it on Docker Hub - requires specific python dependencies - default command and entrypoint - Dockerfile: alpine, bwa, resolve dependencies, ... - two person exercise: - image on docker hub - produce a visualisation which is exported to png ## Notes - need a short section on other container registries: biocontainers, quay.io (supports podman and rkt) etc. Also to mention [open containers initiative](https://opencontainers.org/) - Discussion about reproducibility, tagging and export of images. ## Contribution notes This Markdown-file can be collaboratively and simultaneously edited from [this link](https://hackmd.io/@tmuylder/H1CSvMFZ_/edit). Please push to the branch `containers` in order not to make conflicting versions. This is automatically done when you push the Hackmd-file to GitHub (click on Settings... right top --> Versions and GitHub Sync --> Push). However, might only be done by @tmuylder.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully