HUB
Sign inSign up

skchronicles/pycoqc

By skchronicles

•Updated almost 4 years ago

Docker image for pycoQC: https://github.com/a-slide/pycoQC/

Image
0

548

skchronicles/pycoqc repository overview

⁠Dockerfile

# Base image for pycoQC,
# uses Ubuntu Jammy (LTS)
FROM ubuntu:22.04

# Depedencies of pycoQC:
# https://a-slide.github.io/pycoQC/installation/
#  - pycoQC/2.5.2
#      @requires: python3
#      @requires: python3-numpy>=1.13
#      @requires: python3-scipy>=1.1
#      @requires: python3-pandas>=0.23
#      @requires: python3-plotly>=3.4
#      @requires: python3-jinja2>=2.10
#      @requires: python3-h5py>=2.8.0
#      @requires: python3-tqdm>=4.23
LABEL maintainer="Skyler Kuhn" \
    base_image="ubuntu:22.04" \
    version="v0.1.0"   \
    software="pycoQC" \
    about.summary="pycoQC computes metrics and generates Interactive QC plots from ONT data" \
    about.home="https://github.com/a-slide/pycoQC/" \
    about.documentation="https://a-slide.github.io/pycoQC/" \
    about.tags="nanopore-qc"

############### INIT ################
# Create Container filesystem specific 
# working directory and opt directories
# to avoid collisions with the host's
# filesystem, i.e. /opt and /data
RUN mkdir -p /opt2 && mkdir -p /data2
WORKDIR /opt2 

# Set time zone to US east coast 
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
        && echo $TZ > /etc/timezone

############### SETUP ################
# This section installs system packages 
# required for your project. If you need 
# extra system packages add them here.
RUN apt-get update \
    && apt-get -y upgrade \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
        build-essential \
        cmake \
        curl \
        gawk \
        gzip \
        locales \
        unzip \
        wget \
        zlib1g-dev \
        # pycoQC dependencies
        python3 \
        python3-pip \
    && apt-get clean && apt-get purge \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Set the locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8

# Make python3 the default interpreter
# and install Python Packages 
# and install pycoQC/2.5.2
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN pip3 install --upgrade pip \
	&& pip3 install argparse \
    && pip3 install matplotlib \
    && pip3 install pycoQC==2.5.2

############### MANUAL ################
# Install tools from src manually
# Install missing compression
# library needed for nanopolish,
# need to export HDF5_PLUGIN_PATH,
# see below
RUN wget https://github.com/nanoporetech/vbz_compression/releases/download/1.0.2/ont-vbz-hdf-plugin_1.0.2-1.focal_amd64.deb \
    -O /opt2/ont-vbz-hdf-plugin_1.0.2-1.focal_amd64.deb \
    && apt --fix-broken install /opt2/ont-vbz-hdf-plugin_1.0.2-1.focal_amd64.deb \
    && rm /opt2/ont-vbz-hdf-plugin_1.0.2-1.focal_amd64.deb \
    && apt-get clean && apt-get purge \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

################ POST #################
# Add Dockerfile and export environment 
# variables and update permissions
ADD Dockerfile /opt2/pycoqc.dockerfile
RUN chmod -R a+rX /opt2
ENV PATH="/opt2:$PATH" \
    HDF5_PLUGIN_PATH="/usr/local/hdf5/lib/plugin/" 
WORKDIR /data2

⁠Steps for Building Docker Images

Building a seperate Docker image specific for pycoQC because its python dependencies clash with other tools required dependencies.

Directly below are instructions for building an image using the provided Dockerfile:

# See listing of images on computer
docker image ls

# Build from Dockerfile
docker build --no-cache -f Dockerfile --tag=pycoqc:v0.1.0 .

# Testing, take a peek inside
docker run -ti pycoqc:v0.1.0 /bin/bash

# Updating Tag  before pushing to DockerHub
docker tag pycoqc:v0.1.0 skchronicles/pycoqc:v0.1.0
docker tag pycoqc:v0.1.0 skchronicles/pycoqc         # latest

# Check out new tag(s)
docker image ls

# Push new tagged image to DockerHub
docker push skchronicles/pycoqc:v0.1.0
docker push skchronicles/pycoqc:latest

Scan your image for known vulnerabilities:

docker scan pycoqc:v0.1.0

Please Note: Any references to skchronicles should be replaced your username if you would also like to push the image to a non-org account.

Tag summary

Content type

Image

Digest

sha256:ae1517979…

Size

418.4 MB

Last updated

almost 4 years ago

docker pull skchronicles/pycoqc