-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docker file for building site
- Loading branch information
Showing
11 changed files
with
422 additions
and
276 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -14,6 +14,9 @@ on: | |
|
||
env: | ||
PARTICIPANT_DATA: | ||
REGISTRY: ghcr.io | ||
ORG: nbisweden | ||
IMAGE: workshop-pgip/workshop-pgip:latest | ||
|
||
jobs: | ||
build: | ||
|
@@ -26,6 +29,13 @@ jobs: | |
run: | ||
shell: bash -l {0} | ||
steps: | ||
- name: Set time zone | ||
uses: szenius/[email protected] | ||
with: | ||
timezoneLinux: "Europe/Stockholm" | ||
timezoneMacos: "Europe/Stockholm" | ||
timezoneWindows: "W. Europe Standard Time" | ||
|
||
- name: Cancel Previous Runs | ||
if: ${{ !env.ACT }} | ||
uses: styfle/[email protected] | ||
|
@@ -35,24 +45,26 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
micromamba-version: "1.3.1-0" | ||
environment-file: conda-linux-64.lock | ||
environment-name: pgip | ||
init-shell: bash | ||
cache-environment: true | ||
|
||
- name: Test git installation | ||
run: | | ||
git --help | ||
echo Listing branches | ||
git branch -l | ||
echo Fetching branches | ||
git fetch --all | ||
echo Listing branches again | ||
git branch --list | ||
- name: Pull image | ||
run: docker pull ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} | ||
# - name: Install micromamba | ||
# uses: mamba-org/setup-micromamba@v1 | ||
# with: | ||
# micromamba-version: "1.3.1-0" | ||
# environment-file: conda-linux-64.lock | ||
# environment-name: pgip | ||
# init-shell: bash | ||
# cache-environment: true | ||
|
||
# - name: Test git installation | ||
# run: | | ||
# git --help | ||
# echo Listing branches | ||
# git branch -l | ||
# echo Fetching branches | ||
# git fetch --all | ||
# echo Listing branches again | ||
# git branch --list | ||
|
||
- name: Install pgip dependencies | ||
run: | | ||
|
@@ -121,13 +133,27 @@ jobs: | |
fi | ||
- name: Render tag and save rendered state in separate branch | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
target: "archive-${{ github.ref_name }}" | ||
path: docs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_EMAIL: [email protected] | ||
GITHUB_USERNAME: gh_action | ||
TARGET: "archive-${{ github.ref_name }}" | ||
run: | | ||
# Add git info | ||
git config --global user.email "${{ env.GITHUB_EMAIL }}" | ||
git config --global user.name "${{ env.GITHUB_USERNAME }}" | ||
git clone --single-branch --branch ${{ env.TARGET }} "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" tmprepo | ||
# - name: Render tag and save rendered state in separate branch | ||
# uses: quarto-dev/quarto-actions/publish@v2 | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
# with: | ||
# target: "archive-${{ github.ref_name }}" | ||
# path: docs | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout archived course versions | ||
env: | ||
|
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
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
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,55 @@ | ||
# Docker file for workshop-pgip | ||
# 2023 Per Unneberg | ||
|
||
FROM rocker/verse:4.2.3 | ||
LABEL Description="Docker image for NBIS workshop Population Genomics in Practice" | ||
LABEL Maintainer="[email protected]" | ||
LABEL org.opencontainers.image.source="https://github.com/NBISweden/workshop-pgip" | ||
ARG QUARTO_VERSION="1.3.450" | ||
ENV PATH="${PATH}:/miniconda3/bin" | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install --no-install-recommends -y \ | ||
libxml2-dev \ | ||
libssl-dev \ | ||
libcurl4-openssl-dev \ | ||
libudunits2-dev \ | ||
libgdal-dev \ | ||
texlive \ | ||
texlive-latex-extra \ | ||
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ | ||
&& apt-get install -y ./google-chrome-stable_current_amd64.deb \ | ||
&& rm -rf ./google-chrome-stable_current_amd64.deb \ | ||
&& curl -o quarto-linux-amd64.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb \ | ||
&& apt-get install -y ./quarto-linux-amd64.deb \ | ||
&& rm -rf ./quarto-linux-amd64.deb \ | ||
&& Rscript -e 'install.packages(c("ape", "codetools", "curl", "devtools", "dt", "dygraphs", "expm", "fontawesome", "formatr"), repos = "http://cran.us.r-project.org");' \ | ||
&& Rscript -e 'install.packages(c("formattable", "gganimate", "ggiraph", "ggraph", "ggplot2", "gifski", "gplots"), repos = "http://cran.us.r-project.org");' \ | ||
&& Rscript -e 'install.packages(c("gsalib", "highcharter", "igraph", "kableExtra", "latex2exp", "leaflet"), repos = "http://cran.us.r-project.org");' \ | ||
&& Rscript -e 'install.packages(c("networkD3", "magick", "patchwork", "pdftools", "plotly", "readr", "readxl", "reticulate"), repos = "http://cran.us.r-project.org");' \ | ||
&& Rscript -e 'install.packages(c("rmarkdown", "tidyr", "viridis"), repos = "http://cran.us.r-project.org");' \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir /qmd | ||
|
||
RUN mkdir -p /miniconda3 \ | ||
&& wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /miniconda3/miniconda.sh \ | ||
&& bash /miniconda3/miniconda.sh -b -u -p /miniconda3 \ | ||
&& rm -rf /miniconda3/miniconda.sh | ||
|
||
RUN conda init bash | ||
|
||
COPY env.yaml /tmp/env.yaml | ||
RUN conda env update -n base -f /tmp/env.yaml | ||
ENV PATH /miniconda3/envs/base/bin:$PATH | ||
RUN /bin/bash -c "source activate base" | ||
|
||
RUN python -m ipykernel install --user --display-name "Population Genomics in Practice (Python)" | ||
RUN python -m pip install git+https://github.com/NBISweden/pgip-tools | ||
|
||
RUN Rscript -e 'install.packages("dotenv", repos=c(CRAN = "https://cran.rstudio.com/"));' \ | ||
R -e "library(devtools); devtools::install_local('../src/R/pgip', upgrade=FALSE)" | ||
|
||
WORKDIR /qmd | ||
ENV XDG_CACHE_HOME=/tmp/quarto_cache_home | ||
ENV XDG_DATA_HOME=/tmp/quarto_data_home | ||
CMD quarto render |
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,44 @@ | ||
## Environment file to reproduce exercises | ||
name: base | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- bash_kernel | ||
- bedtools | ||
- bcftools | ||
- bokeh | ||
- bwa | ||
- ca-certificates | ||
- csvtk | ||
# - cyvcf2 | ||
- demesdraw | ||
- d4tools | ||
- fastqc | ||
- gatk4 | ||
- gawk | ||
# - htslib=1.15.1 | ||
- ipykernel | ||
- jupyter | ||
- jupyter-cache | ||
- mosdepth # =0.3.3 | ||
- msprime>=1.2 | ||
- multiqc | ||
- pandas | ||
- pip | ||
- picard #<3 | ||
- pyslim | ||
- python-newick | ||
- qualimap | ||
- samtools=1.15.1 | ||
- scikit-allel | ||
- seqkit | ||
- slim>=4.0 | ||
- tskit>=0.5.0 | ||
- vcflib=1.0.1 | ||
- vcftools | ||
- pip: | ||
- cyvcf2 | ||
- pixy | ||
- sgkit[vcf] |
File renamed without changes.
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
File renamed without changes.