Skip to content

Docker

VNtyper 2 provides pre-built Docker images with all dependencies included.

Pull Pre-built Images

docker pull saei/vntyper:latest
docker pull ghcr.io/hassansaei/vntyper:latest

Build from Source

git clone https://github.com/hassansaei/VNtyper.git
cd VNtyper
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile -t vntyper:latest .

Or use Make:

make docker-build

Run the Pipeline

docker run -w /opt/vntyper --rm \
    --user $(id -u):$(id -g) \
    -v /path/to/input:/opt/vntyper/input \
    -v /path/to/output:/opt/vntyper/output \
    vntyper:latest \
    vntyper pipeline --bam /opt/vntyper/input/sample.bam \
    -o /opt/vntyper/output/sample/

File Permissions

Use --user $(id -u):$(id -g) so output files are owned by your host user, not root.

Volume Mounts

Host Path Container Path Purpose
Input directory /opt/vntyper/input BAM/FASTQ files
Output directory /opt/vntyper/output Pipeline results

Verify Installation

docker run --rm vntyper:latest vntyper --version
docker run --rm vntyper:latest samtools --version
docker run --rm vntyper:latest java -version

Health Checks

The container includes a built-in health check. Monitor status with:

docker ps

View container logs:

docker logs <container_id>

API Server

Start the FastAPI server for programmatic access:

docker run -d -p 8000:8000 \
    -v /path/to/input:/opt/vntyper/input \
    -v /path/to/output:/opt/vntyper/output \
    vntyper:latest

Submit a job:

curl -X POST "http://localhost:8000/run-job/" \
    -F "file=@sample.bam" \
    -F "thread=4" \
    -F "reference_assembly=hg38" \
    -F "fast_mode=true" \
    -F "archive_results=true"

Download results after completion:

curl -O "http://localhost:8000/download/sample.zip"

Apptainer / Singularity

Convert the Docker image to an Apptainer SIF:

apptainer pull docker://saei/vntyper:latest

Run with Apptainer:

apptainer run --pwd /opt/vntyper \
    -B /path/to/input:/opt/vntyper/input \
    -B /path/to/output:/opt/vntyper/output \
    vntyper_latest.sif vntyper pipeline \
    --bam /opt/vntyper/input/sample.bam \
    -o /opt/vntyper/output/sample/