-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from NBISweden/docker-changes
Changes to Docker material
- Loading branch information
Showing
6 changed files
with
338 additions
and
200 deletions.
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, john.sundh@scilifelab.se; Erik Fasterius, erik.fasterius@nbis.se" | ||
LABEL description="Image for the NBIS reproducible research course." | ||
LABEL author="John Sundh" | ||
LABEL email="john.sundh@scilifelab.se" | ||
|
||
# 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, john.sundh@scilifelab.se; Erik Fasterius, erik.fasterius@nbis.se" | ||
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