Skip to content
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

Lskatz patch 1 #357

Merged
merged 27 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fcd86bd
Create Dockerfile
lskatz Apr 27, 2022
fdfd2dc
Rename EToKi/1.2/Dockerfile to etoki/1.2/Dockerfile
lskatz Apr 27, 2022
b928781
README.md, EToKi
lskatz Apr 27, 2022
8dc4adf
EToKi program license
lskatz Apr 27, 2022
76dad2e
Create README.md
lskatz Apr 27, 2022
89dd197
Create test-etoki.yml
lskatz Apr 27, 2022
e5b1894
added back in FROM app as test
lskatz Apr 27, 2022
74dd0de
moving to multistage build
lskatz Apr 28, 2022
0f5fc24
Update Dockerfile
lskatz Apr 28, 2022
5b31182
added back in test
lskatz Apr 28, 2022
b518473
updated multistage etoki
lskatz May 2, 2022
f582fe8
with ideas from Erin
lskatz May 2, 2022
0f18dc2
etoki finally works
May 3, 2022
ac94572
etoki test works
May 4, 2022
b9600f9
incorporating a suggestion from @erinyoung
lskatz May 23, 2022
0968609
pulled in erinyoung's suggestion
lskatz May 23, 2022
5a43e8f
added note that usearch replaced by blast
lskatz May 23, 2022
cf0b20f
Merge branch 'StaPH-B:master' into lskatz-patch-1
lskatz May 25, 2022
dcaf8d0
updated to EToKi lskatz fork
lskatz May 26, 2022
e825d16
Merge branch 'lskatz-patch-1' of github.com:lskatz/docker-builds into…
lskatz May 26, 2022
6dde555
updated EToKi to v1.2.1 and made a note in the EToKi readme that only…
lskatz May 26, 2022
a66fd67
fixed version in test-etoki.yml to v1.2.1
lskatz Jun 9, 2022
a9dd585
etoki v1.2.1
lskatz Jun 9, 2022
8532070
v1.2.1
lskatz Jun 9, 2022
781b52c
added wget command instead of git checkout; v1.2.1
lskatz Jun 9, 2022
f6cf4c3
added `tar zxvf ${ETOKI_VER}.tar.gz`
lskatz Jun 18, 2022
ae897fd
Delete test-etoki.yml
lskatz Jun 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/test-etoki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This caller workflow builds an image to the "test" stage.
lskatz marked this conversation as resolved.
Show resolved Hide resolved
# Instructions: replace all the <placeholder> stubs in this template with values for your image.
# Some explanations come from: https://github.com/actions/starter-workflows/blob/main/automation/manual.yml

name: Test etoki image

# Controls when the action will run. Workflow runs when manually triggered using the UI or when you submit your pull request
on:
workflow_dispatch:
pull_request:
paths:
- "etoki/1.2/Dockerfile" # Dockerfile path, e.g. 'htslib/1.14/Dockerfile' so that only your image is tested
lskatz marked this conversation as resolved.
Show resolved Hide resolved

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

# This job calls a workflow to build the image to the 'test' stage
build-to-test:
uses: ./.github/workflows/build-to-test.yml
with:
path_to_context: "./etoki/1.2" # Path to directory with Dockerfile and context, e.g. "./spades/3.12.0"
dockerfile_name: "Dockerfile"
cache: "etoki" # Use the program name as a nickname for a GitHub cache of your image's layers, e.g. "spades". The cache will speed up re-running the workflow.
1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The licenses of the open-source software that is contained in these Docker image
| colorid | MIT | https://github.com/hcdenbakker/colorid/blob/master/LICENSE |
| DSK | GNU Affero GPLv3 | https://github.com/GATB/dsk/blob/master/LICENSE |
| emm-typing-tool | GNU GPLv3 | https://github.com/phe-bioinformatics/emm-typing-tool/blob/master/LICENCE |
| EToKi | GNU GPLv3 | https://github.com/zheminzhou/EToKi/blob/master/LICENSE |
| FastANI | Apache v2.0 | https://github.com/ParBLiSS/FastANI/blob/master/LICENSE |
| FastTree | GNU GPLv2 | http://www.microbesonline.org/fasttree/ |
| FastQC | GNU GPLv3 | https://github.com/s-andrews/FastQC/blob/master/LICENSE.txt |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [datasets-sars-cov-2](https://github.com/CDCgov/datasets-sars-cov-2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/datasets-sars-cov-2)](https://hub.docker.com/r/staphb/datasets-sars-cov-2) | <ul><li>0.6.2</li><li>0.6.3</li></ul> | https://github.com/CDCgov/datasets-sars-cov-2 |
| [DSK](https://hub.docker.com/r/staphb/dsk) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/dsk)](https://hub.docker.com/r/staphb/dsk) | <ul><li>0.0.100</li></ul> | https://gatb.inria.fr/software/dsk/ |
| [emm-typing-tool](https://hub.docker.com/r/staphb/emm-typing-tool) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/emm-typing-tool)](https://hub.docker.com/r/staphb/emm-typing-tool) | <ul><li>0.0.1 (no version)</li></ul> | https://github.com/phe-bioinformatics/emm-typing-tool |
| [EToKi](https://hub.docker.com/r/staphb/etoki) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/etoki)](https://hub.docker.com/r/staphb/etoki) | <ul><li>1.2</li></ul> | https://github.com/zheminzhou/EToKi |
| [FastANI](https://hub.docker.com/r/staphb/fastani) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fastani)](https://hub.docker.com/r/staphb/fastani) | <ul><li>1.1</li><li>1.32</li><li>1.33</li></ul> | https://github.com/ParBLiSS/FastANI |
| [FastTree](https://hub.docker.com/r/staphb/fasttree) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fasttree)](https://hub.docker.com/r/staphb/fasttree) | <ul><li>2.1.11</li></ul> | http://www.microbesonline.org/fasttree/ |
| [FastQC](https://hub.docker.com/r/staphb/fastqc) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/fastqc)](https://hub.docker.com/r/staphb/fastqc) | <ul><li>0.11.8</li><li>0.11.9</li></ul> | https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ <br/> https://github.com/s-andrews/FastQC |
Expand Down
109 changes: 109 additions & 0 deletions etoki/1.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# FROM defines the base docker image. This command has to come first in the file
# The 'as' keyword lets you name the folowing stage. We use `app` for the production image
#FROM ubuntu:focal as app
# Copying the Freyja container a bit
FROM mambaorg/micromamba:0.22.0 as app

# ARG sets environment variables during the build stage
ARG SOFTWARENAME_VER="1.2"

# build and run as root users since micromamba image has 'mambauser' set as the $USER
USER root
# set workdir to default for building; set to /data at the end
WORKDIR /

# LABEL instructions tag the image with metadata that might be important to the user
# Optional, but highly recommended
LABEL base.image="ubuntu:focal"
lskatz marked this conversation as resolved.
Show resolved Hide resolved
LABEL dockerfile.version="1"
LABEL software="EToKi"
LABEL software.version=$SOFTWARENAME_VER
LABEL description="All methods related to Enterobase data analysis pipelines"
LABEL website="https://github.com/zheminzhou/EToKi"
LABEL license="https://github.com/zheminzhou/EToKi/blob/master/LICENSE"
LABEL maintainer="Lee Katz"
LABEL maintainer.email="[email protected]"

# https://askubuntu.com/a/1013396
# avoid asking about timezone during apt-get
ARG DEBIAN_FRONTEND=noninteractive

# RUN executes code during the build
# Install dependencies via apt-get or yum if using a centos or fedora base
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-pip \
python3-dev \
libgconf-2-4 \
curl \
unzip \
libcurl4-openssl-dev \
build-essential \
git \
pigz \
libcurl4-openssl-dev \
libcurl4 \
ant \
libssl-dev \
python3-venv \
wget && \
apt-get autoclean

#openjdk-8-jdk \

# Gimme python3 instead of python2
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1

# Double check the python version
RUN python --version

# set the environment, put new conda env in PATH by default
ENV PATH="/opt/conda/envs/etoki/bin:/opt/conda/envs/env/bin:${PATH}" \
LC_ALL=C.UTF-8


RUN micromamba create -n etoki python=3.8 -c conda-forge -c bioconda -c defaults ete3 numba numpy pandas scikit-learn psutil click scipy && \
micromamba clean -a -y
# might also have to install sklearn??

# Now get us into that yummy yummy EToKi env
ENV ENV_NAME="etoki"
ARG MAMBA_DOCKERFILE_ACTIVATE=1

## EToKi itself ##

# ENV instructions set environment variables that persist from the build into the resulting image
# Use for e.g. $PATH and locale settings for compatibility with Singularity
ENV PATH="/usr/local/bin/EToKi:$PATH" \
LC_ALL=C

RUN cd /usr/local/bin && git clone https://github.com/zheminzhou/EToKi.git -b ${SOFTWARENAME_VER}

# Installs all 3rd party software except the kraken database and usearch
RUN cd /usr/local/bin/EToKi && python EToKi.py configure --install

RUN find /usr/local/bin/EToKi -name '*.py' -exec sed -i.bak -e '1 i #!/usr/bin/env python\n# ^^^ inserted corrected shebang for this container' {} \;

# WORKDIR sets working directory
WORKDIR /data

# A second FROM insruction creates a new stage
# We use `test` for the test image
#FROM app as test
lskatz marked this conversation as resolved.
Show resolved Hide resolved

# Demonstrate that the program is successfully installed

# Option 1: run the program's internal tests, for example with SPAdes:
RUN cd /usr/local/bin/EToKi && EToKi.py --help
#RUN cd /usr/local/bin/EToKi && $(which python) $(which EToKi.py) --help
RUN cd /usr/local/bin/EToKi && bash example.bash

# Option 2: write your own tests in a bash script in the same directory as your Dockerfile:
#COPY my_tests.sh .
#RUN bash my_tests.sh

# Option 3: write python unit tests in a tests/ directory in the same directory as your Dockerfile:
#RUN apt-get install -y python3
#RUN mkdir tests/
#COPY tests/ tests/
#RUN python3 -m unittest discover -s tests
#
Loading