-
Notifications
You must be signed in to change notification settings - Fork 42
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 #456 from sunbeam-labs/455-restructure-containeriz…
…ation 455 restructure containerization
- Loading branch information
Showing
25 changed files
with
507 additions
and
156 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
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 |
---|---|---|
|
@@ -4,9 +4,6 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run-tests: | ||
|
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,12 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run-tests: | ||
uses: ./.github/workflows/tests.yml | ||
secrets: inherit | ||
|
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 |
---|---|---|
@@ -1,66 +1,44 @@ | ||
FROM condaforge/mambaforge:latest | ||
LABEL io.github.snakemake.containerized="true" | ||
LABEL io.github.snakemake.conda_env_hash="12452d6af82ca1066b553b1905c85b62405942009ebafb5e897d30b84646e799" | ||
|
||
# Step 1: Retrieve conda environments | ||
# Setup | ||
WORKDIR /home/sunbeam | ||
|
||
# Conda environment: | ||
# source: workflow/envs/cutadapt.yml | ||
# prefix: /conda-envs/08b0272f8c744b8bb162030774cf9917 | ||
# channels: | ||
# - bioconda | ||
# dependencies: | ||
# - cutadapt | ||
# #- python =3.12.0 | ||
# name: cutadapt | ||
RUN mkdir -p /conda-envs/08b0272f8c744b8bb162030774cf9917 | ||
COPY workflow/envs/cutadapt.yml /conda-envs/08b0272f8c744b8bb162030774cf9917/environment.yaml | ||
RUN mkdir -p etc/ | ||
COPY etc/* etc/ | ||
|
||
# Conda environment: | ||
# source: workflow/envs/komplexity.yml | ||
# prefix: /conda-envs/cc72134ebb57f052a6ac7d5a084f9bf6 | ||
# channels: | ||
# - eclarke | ||
# - conda-forge | ||
# dependencies: | ||
# - komplexity | ||
# - python =3.12.0 | ||
# name: komplexity | ||
RUN mkdir -p /conda-envs/cc72134ebb57f052a6ac7d5a084f9bf6 | ||
COPY workflow/envs/komplexity.yml /conda-envs/cc72134ebb57f052a6ac7d5a084f9bf6/environment.yaml | ||
RUN mkdir -p extensions/ | ||
COPY extensions/.placeholder extensions/ | ||
|
||
# Conda environment: | ||
# source: workflow/envs/qc.yml | ||
# prefix: /conda-envs/2e2d3aeac664927deed435e9fde5bf30 | ||
# channels: | ||
# - bioconda | ||
# - conda-forge | ||
# dependencies: | ||
# - bwa | ||
# - fastqc | ||
# - trimmomatic | ||
# - python =3.12.0 | ||
# name: qc | ||
RUN mkdir -p /conda-envs/2e2d3aeac664927deed435e9fde5bf30 | ||
COPY workflow/envs/qc.yml /conda-envs/2e2d3aeac664927deed435e9fde5bf30/environment.yaml | ||
RUN mkdir -p src/sunbeamlib/ | ||
COPY src/sunbeamlib/* src/sunbeamlib/ | ||
|
||
# Conda environment: | ||
# source: workflow/envs/reports.yml | ||
# prefix: /conda-envs/60172346a36951e9f4497f0c766b8d74 | ||
# channels: | ||
# - conda-forge | ||
# dependencies: | ||
# - numpy | ||
# - pandas | ||
# - python =3.12.0 | ||
# name: reports | ||
RUN mkdir -p /conda-envs/60172346a36951e9f4497f0c766b8d74 | ||
COPY workflow/envs/reports.yml /conda-envs/60172346a36951e9f4497f0c766b8d74/environment.yaml | ||
COPY tests/ tests/ | ||
|
||
# Step 2: Generate conda environments | ||
COPY workflow/ workflow/ | ||
|
||
RUN mamba env create --prefix /conda-envs/08b0272f8c744b8bb162030774cf9917 --file /conda-envs/08b0272f8c744b8bb162030774cf9917/environment.yaml && \ | ||
mamba env create --prefix /conda-envs/cc72134ebb57f052a6ac7d5a084f9bf6 --file /conda-envs/cc72134ebb57f052a6ac7d5a084f9bf6/environment.yaml && \ | ||
mamba env create --prefix /conda-envs/2e2d3aeac664927deed435e9fde5bf30 --file /conda-envs/2e2d3aeac664927deed435e9fde5bf30/environment.yaml && \ | ||
mamba env create --prefix /conda-envs/60172346a36951e9f4497f0c766b8d74 --file /conda-envs/60172346a36951e9f4497f0c766b8d74/environment.yaml && \ | ||
mamba clean --all -y | ||
COPY environment.yml install.sh MANIFEST.in pyproject.toml pytest.ini README.md ./ | ||
|
||
# Install sunbeam | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y git | ||
RUN ./install.sh -e sunbeam -v | ||
|
||
ENV PATH="/opt/conda/envs/sunbeam/bin/:${PATH}" | ||
ENV SUNBEAM_DIR="/home/sunbeam" | ||
ENV SUNBEAM_VER="4.4.0" | ||
ENV SUNBEAM_MIN_MEM_MB="8000" | ||
ENV SUNBEAM_MIN_RUNTIME="60" | ||
|
||
# Install conda environments | ||
RUN mkdir -p projects | ||
RUN sunbeam init --data_fp tests/data/reads projects/init | ||
RUN sunbeam run --profile projects/init --conda-create-envs-only --mamba | ||
RUN rm -r projects | ||
|
||
# "Activate" the environment | ||
SHELL ["conda", "run", "-n", "sunbeam", "/bin/bash", "-c"] | ||
#RUN bash /opt/conda/envs/sunbeam/etc/conda/activate.d/env_vars.sh | ||
|
||
# Run | ||
CMD "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
Oops, something went wrong.