-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add a Docker container #527
Open
maol-corteva
wants to merge
4
commits into
OpenGene:master
Choose a base branch
from
maol-corteva:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
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,56 @@ | ||
############# | ||
# Dockerfile to build container image for fastp : a bionformatics NGS QC/adapter-trim tool | ||
# See Docs and Source code at: https://github.com/OpenGene/fastp | ||
# Example unix cmdline and parameters: | ||
# fastp -i raw.fq -o ./clean.fq -h "<samplename>-fastp_report" -w12 -e 25 -l 40 -y -5 -3 -W4 -M20 \ | ||
# --overrepresentation_analysis -P 100 --dont_eval_duplication -x | ||
# Build Image with (and specify tagged version): | ||
# docker build --build-arg FP_VERSION=0.23.4 -t fastp:0.23.4 -f ./Dockerfile.fastp . | ||
# | ||
# OR to change the build user id to run as yourself, do this: | ||
# export myUID=$(id -u) ; export myGID=$(id -g) # See below for details setting the user | ||
# docker build --build-arg USER=$myUID:$myGID FP_VERSION=0.23.4 -t fastp:0.23.4 -f ./Dockerfile.fastp . | ||
# Run in iteractive mode like: | ||
# docker run -it --rm --network="host" --cpus=2 -m 64000m -v ${PWD}:${PWD} -w ${PWD} --entrypoint /bin/bash my_image | ||
# ... where "my_image" is the full length image name (i.e: fastp:latest) or the specific "IMAGE ID" in your docker setup (docker image ls) | ||
# OR run as default and it will use the internal entrypoint: | ||
# docker run -it --rm --network="host" -v ${PWD}:${PWD} -w ${PWD} my_image --flags | ||
# Here is a full example with flags, running within the Docker: | ||
# /app/fastp -i testsample-pairsR1.fq.gz -I testsample-pairsR2.fq.gz -R testsample_fastP -h testsample.fastp_report.html | ||
# --thread 12 --detect_adapter_for_pe --dedup --dup_calc_accuracy 4 -e 25 -l 35 --trim_poly_g --trim_poly_x -p -P 100 | ||
############# | ||
|
||
# FROM scratch | ||
FROM ubuntu:20.04 | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
ARG DEBIAN_FRONTEND="noninteractive" | ||
ARG TZ="UTC" | ||
ENV TZ="${TZ}" | ||
|
||
# Update the repository sources list | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
nano \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nowhere to use nano? |
||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# Verified version of 'fastp' to use. 0.23.4 as of Q3 2023. Provide as cmdline argument to override. Assumes a Linux 64bit ELF binary | ||
ARG FP_VERSION=0.23.4 | ||
|
||
# Get the precompiled package version wanted | ||
# fastp v0.23.4 | ||
WORKDIR /app | ||
RUN wget http://opengene.org/fastp/fastp.${FP_VERSION} \ | ||
&& mv fastp.${FP_VERSION} fastp \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. try to use |
||
&& chmod a+x ./fastp | ||
|
||
# Set run user/group as myUID 2000 myGID 3000 for use in Kubernetes (and avoid running as root) | ||
ARG USER=appuser | ||
ARG USERGROUP=appgroup | ||
ARG myUID=2000 | ||
ARG myGID=3000 | ||
RUN groupadd -r -g ${myGID} ${USERGROUP} && useradd -g ${myGID} --myUID=${myUID} ${USER} | ||
# USER appuser:appgroup | ||
USER ${myUID}:${myGID} | ||
ENTRYPOINT ["/app/fastp"] |
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
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.
how about alpine which is more smaller