-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to Docker material #270
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f526e98
Remove MAINTAINER label from Dockerfiles
fasterius 99795d2
Add note on OCI Docker label best practices
fasterius 31bff6c
Fix naming of Dockerfiles according to conventions
fasterius c215721
Harmonise Dockerfile formatting
fasterius 19e9a0f
Fix naming of `linux/amd64` platform specification
fasterius c32405b
Add missing note title word
fasterius a58e880
Streamline `[slim/conda].Dockerfile` files
fasterius a5b23f3
Streamline final tutorial Dockerfile
fasterius d17a01a
Add extra material for multi-stage Docker builds
fasterius 1682dd0
Fix broken Docker image
fasterius bcd97a5
Minor updates to conform to build checks
johnne 461337b
Fix CMD line of Dockerfile
johnne c6cca74
Add SHELL instruction
johnne 0994714
Fix embedding of resources in Quarto document
fasterius 9324734
Set SHELL to not require JSON format for CMD
johnne e3e8b14
Fix embed-resources
johnne a1668fe
Move callout for ARM users
johnne d74046a
Merge branch 'docker-changes' of github.com:NBISweden/workshop-reprod…
johnne 837c4c3
Remove section on jupyter notebook with Docker
johnne 1fc4dad
Remove expose part from Dockerfile
johnne 11805cf
Make supplementary table less redundant
johnne 9365c3b
Fix minor formatting and spelling errors
johnne 61d1b4a
Give explicit name for multi-stage Dockerfile
johnne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,41 @@ | ||
FROM --platform=amd64 condaforge/miniforge3 | ||
FROM condaforge/miniforge3:24.7.1-0 | ||
|
||
LABEL authors="John Sundh, [email protected]; Erik Fasterius, [email protected]" | ||
LABEL description="Image for the NBIS reproducible research course." | ||
LABEL author="John Sundh" | ||
LABEL email="[email protected]" | ||
|
||
# Use bash as shell | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
# Set workdir | ||
WORKDIR /course | ||
|
||
# Set timezone | ||
ENV TZ="Europe/Stockholm" | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
# Use bash as shell | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Install packages require for timezone and Quarto installation | ||
RUN apt-get update \ | ||
&& apt-get install -y tzdata curl \ | ||
&& apt-get clean | ||
# Install required packages | ||
RUN apt-get update && \ | ||
apt-get install -y curl && \ | ||
apt-get clean | ||
|
||
# Install Quarto | ||
ARG QUARTO_VERSION="1.3.450" | ||
RUN mkdir -p /opt/quarto/${QUARTO_VERSION} \ | ||
&& curl -o quarto.tar.gz -L "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" \ | ||
&& tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 \ | ||
&& rm quarto.tar.gz | ||
ENV PATH /opt/quarto/${QUARTO_VERSION}/bin:${PATH} | ||
RUN mkdir -p /opt/quarto/${QUARTO_VERSION} && \ | ||
curl -o quarto.tar.gz -L "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.tar.gz" && \ | ||
tar -zxvf quarto.tar.gz -C "/opt/quarto/${QUARTO_VERSION}" --strip-components=1 && \ | ||
rm quarto.tar.gz | ||
ENV PATH=/opt/quarto/${QUARTO_VERSION}/bin:${PATH} | ||
|
||
# Configure Conda | ||
RUN conda init bash && conda config --set channel_priority strict && \ | ||
conda config --append channels bioconda && \ | ||
conda config --append channels r && \ | ||
conda config --set subdir linux-64 | ||
RUN conda config --set channel_priority strict && \ | ||
conda config --append channels bioconda | ||
|
||
# Install environment | ||
COPY environment.yml ./ | ||
RUN conda env create -f environment.yml -n project_mrsa && \ | ||
conda clean -a | ||
|
||
# Set mrsa-workflow environment as active at start-up | ||
RUN echo "source activate project_mrsa" >> ~/.bashrc | ||
|
||
# Add environment to PATH | ||
ENV PATH /opt/conda/envs/project_mrsa/bin:${PATH} | ||
ENV PATH=/opt/conda/envs/project_mrsa/bin:${PATH} | ||
|
||
# Add project files | ||
COPY Snakefile config.yml ./ | ||
COPY code ./code/ | ||
|
||
# Open up port 8888 | ||
EXPOSE 8888 | ||
|
||
CMD snakemake -p -c 1 --configfile config.yml | ||
CMD snakemake --configfile config.yml -p -c 1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM condaforge/miniforge3 | ||
|
||
LABEL authors="John Sundh, [email protected]; Erik Fasterius, [email protected]" | ||
LABEL description="Minimal image for the NBIS reproducible research course." | ||
|
||
WORKDIR /course | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Install `curl` for downloading of FASTQ data later in the tutorial | ||
RUN apt-get update && \ | ||
apt-get install -y curl && \ | ||
apt-get clean | ||
|
||
# Configure Conda | ||
RUN conda config --set channel_priority strict && \ | ||
conda config --append channels bioconda | ||
|
||
# Start Bash by default | ||
CMD /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
FROM ubuntu:16.04 | ||
|
||
LABEL description = "Image for the NBIS reproducible research course." | ||
MAINTAINER "John Sundh" [email protected] | ||
LABEL authors="John Sundh, [email protected]" | ||
LABEL description="Minimal image for the NBIS reproducible research course." | ||
|
||
# Use bash as shell | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Set workdir | ||
WORKDIR /course | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified the code here to make the sample table less cluttered. There used to be 2 lines for each sample due to the info in
gsm$characteristics_ch1
. Now we extract thetreatment:
andgrowth phase
info and put in separate columns, resulting in a condensed table.