Closed fraser-combe closed 2 weeks ago
Nice work on this dockerfile š OK the GitHub Actions runners don't have enough storage space to run the automated tests. That base image is pretty large which contributed to that. In lieu of the automated tests I've built the docker image locally to test it out. It builds successfully and the tests passes ā
Requested changes:
/README.md
:
/Program_licenses.md
:
dorado/0.8.0/Dockerfile
:
build-essential
since I don't see any compiling happening. please remove line 23ca-certificates
to the apt-get install
command as it's used by wget
apt-get install --no-install-recommends
option to prevent from installing unnecessary packages.&& rm -rf /var/lib/apt/lists/* && apt-get autoclean
to the end of the RUN layer thats starts on line 22. This will remove unnecessary stuff from apt
. Please see other dockerfiles for examples, like this: https://github.com/StaPH-B/docker-builds/blob/4b96906d37f42172a9f3202e62424582cc57495a/shigeifinder/1.3.5/Dockerfile#L35test
stage somewhere. That way we don't have a POD5 file left in the docker image when we deploy it. The deployed image will only have the app
stage includeddorado/0.8.0/README.md
:
$ dorado download --list-yaml
[2024-09-20 21:10:30.520] [info] Running: "download" "--list-yaml"
modification models:
- "dna_r9.4.1_e8_fast@v3.4_5mCG@v0.1"
- "dna_r9.4.1_e8_hac@v3.3_5mCG@v0.1"
- "dna_r9.4.1_e8_sup@v3.3_5mCG@v0.1"
- "dna_r9.4.1_e8_fast@v3.4_5mCG_5hmCG@v0"
- "dna_r9.4.1_e8_hac@v3.3_5mCG_5hmCG@v0"
- "dna_r9.4.1_e8_sup@v3.3_5mCG_5hmCG@v0"
- "dna_r10.4.1_e8.2_260bps_fast@v3.5.2_5mCG@v2"
- "dna_r10.4.1_e8.2_260bps_hac@v3.5.2_5mCG@v2"
- "dna_r10.4.1_e8.2_260bps_sup@v3.5.2_5mCG@v2"
- "dna_r10.4.1_e8.2_400bps_fast@v3.5.2_5mCG@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v3.5.2_5mCG@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v3.5.2_5mCG@v2"
- "dna_r10.4.1_e8.2_260bps_fast@v4.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_260bps_hac@v4.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_260bps_sup@v4.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_fast@v4.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v4.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_260bps_fast@v4.1.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_260bps_hac@v4.1.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_260bps_sup@v4.1.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_fast@v4.1.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v4.1.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.1.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_fast@v4.2.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v4.2.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0_5mCG_5hmCG@v3.1"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0_5mC@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0_6mA@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0_6mA@v3"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0_5mC_5hmC@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mC_5hmC@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mC_5hmC@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_6mA@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_6mA@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_6mA@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_6mA@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v4.3.0_5mCG_5hmCG@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mCG_5hmCG@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_4mC_5mC@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_4mC_5mC@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_4mC_5mC@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_4mC_5mC@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mC_5hmC@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mC_5hmC@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mC_5hmC@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mC_5hmC@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mCG_5hmCG@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mCG_5hmCG@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_5mCG_5hmCG@v2"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_6mA@v1"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_6mA@v1"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0_6mA@v2"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0_6mA@v2"
- "rna004_130bps_sup@v3.0.1_m6A_DRACH@v1"
- "rna004_130bps_hac@v5.0.0_m6A@v1"
- "rna004_130bps_sup@v5.0.0_m6A@v1"
- "rna004_130bps_hac@v5.0.0_m6A_DRACH@v1"
- "rna004_130bps_sup@v5.0.0_m6A_DRACH@v1"
- "rna004_130bps_hac@v5.0.0_pseU@v1"
- "rna004_130bps_sup@v5.0.0_pseU@v1"
- "rna004_130bps_hac@v5.1.0_m5C@v1"
- "rna004_130bps_sup@v5.1.0_m5C@v1"
- "rna004_130bps_hac@v5.1.0_inosine_m6A@v1"
- "rna004_130bps_sup@v5.1.0_inosine_m6A@v1"
- "rna004_130bps_hac@v5.1.0_m6A_DRACH@v1"
- "rna004_130bps_sup@v5.1.0_m6A_DRACH@v1"
- "rna004_130bps_hac@v5.1.0_pseU@v1"
- "rna004_130bps_sup@v5.1.0_pseU@v1"
stereo models:
- "dna_r10.4.1_e8.2_4khz_stereo@v1.1"
- "dna_r10.4.1_e8.2_4khz_stereo@v1.1"
- "dna_r10.4.1_e8.2_5khz_stereo@v1.1"
- "dna_r10.4.1_e8.2_5khz_stereo@v1.2"
- "dna_r10.4.1_e8.2_5khz_stereo@v1.3"
simplex models:
- "dna_r9.4.1_e8_fast@v3.4"
- "dna_r9.4.1_e8_hac@v3.3"
- "dna_r9.4.1_e8_sup@v3.3"
- "dna_r9.4.1_e8_sup@v3.6"
- "dna_r10.4.1_e8.2_260bps_fast@v3.5.2"
- "dna_r10.4.1_e8.2_260bps_hac@v3.5.2"
- "dna_r10.4.1_e8.2_260bps_sup@v3.5.2"
- "dna_r10.4.1_e8.2_400bps_fast@v3.5.2"
- "dna_r10.4.1_e8.2_400bps_hac@v3.5.2"
- "dna_r10.4.1_e8.2_400bps_sup@v3.5.2"
- "dna_r10.4.1_e8.2_260bps_fast@v4.0.0"
- "dna_r10.4.1_e8.2_260bps_hac@v4.0.0"
- "dna_r10.4.1_e8.2_260bps_sup@v4.0.0"
- "dna_r10.4.1_e8.2_400bps_fast@v4.0.0"
- "dna_r10.4.1_e8.2_400bps_hac@v4.0.0"
- "dna_r10.4.1_e8.2_400bps_sup@v4.0.0"
- "dna_r10.4.1_e8.2_260bps_fast@v4.1.0"
- "dna_r10.4.1_e8.2_260bps_hac@v4.1.0"
- "dna_r10.4.1_e8.2_260bps_sup@v4.1.0"
- "dna_r10.4.1_e8.2_400bps_fast@v4.1.0"
- "dna_r10.4.1_e8.2_400bps_hac@v4.1.0"
- "dna_r10.4.1_e8.2_400bps_sup@v4.1.0"
- "dna_r10.4.1_e8.2_400bps_fast@v4.2.0"
- "dna_r10.4.1_e8.2_400bps_hac@v4.2.0"
- "dna_r10.4.1_e8.2_400bps_sup@v4.2.0"
- "dna_r10.4.1_e8.2_400bps_fast@v4.3.0"
- "dna_r10.4.1_e8.2_400bps_hac@v4.3.0"
- "dna_r10.4.1_e8.2_400bps_sup@v4.3.0"
- "dna_r10.4.1_e8.2_400bps_fast@v5.0.0"
- "dna_r10.4.1_e8.2_400bps_hac@v5.0.0"
- "dna_r10.4.1_e8.2_400bps_sup@v5.0.0"
- "dna_r10.4.1_e8.2_apk_sup@v5.0.0"
- "rna002_70bps_fast@v3"
- "rna002_70bps_hac@v3"
- "rna004_130bps_fast@v3.0.1"
- "rna004_130bps_hac@v3.0.1"
- "rna004_130bps_sup@v3.0.1"
- "rna004_130bps_fast@v5.0.0"
- "rna004_130bps_hac@v5.0.0"
- "rna004_130bps_sup@v5.0.0"
- "rna004_130bps_fast@v5.1.0"
- "rna004_130bps_hac@v5.1.0"
- "rna004_130bps_sup@v5.1.0"
One idea I had - users may not want to use a docker image that includes all models due to it's large size. They may be OK with just downloading the model at runtime and using that to save on docker image download time & storage space.
They take up ~4.2GB:
$ du -sch /dorado_models
4.2G /dorado_models
4.2G total
What if we had a nearly identical dockerfile/docker image, but just remove the step to download all the model files? I think that might be useful to someone. Just a thought. We can do that in the future if someone requests it, not necessary to include with this PR.
I have updated the relevant files with the required information and removed the lines not needed, thanks for the review!
Thanks for making those requested changes, Fraser. I made a few small updates to clarify info in the dorado-specific readme.md file and updated some links to match formatting from other links.
I was able to build the docker image locally, which does the cpu only test. It built successfully and tests passed. Here's the command I ran: docker_build -t fraser/dorado:0.8.0-updatedSept30 dorado/0.8.0/
I will test on a local computer with an NVIDIA GPU just to be sure this docker image will work on another machine with a GPU prior to approving/merging/deploying.
OK I tested running this on a Windows 10 computer with WSL2 using ubuntu 20, with an NVIDIA 3080Ti GPU.
Here's output of nvidia-smi
:
$ nvidia-smi
Mon Sep 30 11:34:55 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.02 Driver Version: 560.94 CUDA Version: 12.6 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3080 Ti On | 00000000:09:00.0 On | N/A |
| 0% 60C P0 120W / 319W | 1567MiB / 12288MiB | 8% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 24 G /Xwayland N/A |
| 0 N/A N/A 35 G /Xwayland N/A |
| 0 N/A N/A 36 G /Xwayland N/A |
+-----------------------------------------------------------------------------------------+
Built the image locally with this command which succeeded:
docker buildx build -f dorado/0.8.0/Dockerfile .
Downloaded the test POD5 file with the wget
command from the readme, then basecalled using the GPU with this command:
$ docker run --gpus all -v $PWD:/data 4757f5abb7b5 bash -c "dorado basecaller /dorado_models/dna_r10.4.1_e8.2_260bps_sup@v3.5.2 /data/dna_r10.4.1_e8.2_260bps-FLO_PRO114-SQK_NBD114_96_260-4000.pod5 --emit-moves > /data/basecalled.sam"
==========
== CUDA ==
==========
CUDA Version 12.2.0
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
[2024-09-30 15:37:38.493] [info] Running: "basecaller" "/dorado_models/dna_r10.4.1_e8.2_260bps_sup@v3.5.2" "/data/dna_r10.4.1_e8.2_260bps-FLO_PRO114-SQK_NBD114_96_260-4000.pod5" "--emit-moves"
[2024-09-30 15:37:38.620] [info] > Creating basecall pipeline
[2024-09-30 15:37:39.275] [warning] Unable to find chunk benchmarks for GPU "NVIDIA GeForce RTX 3080 Ti", model /dorado_models/dna_r10.4.1_e8.2_260bps_sup@v3.5.2 and chunk size 1440. Full benchmarking will run for this device, which may take some time.
[2024-09-30 15:37:44.437] [info] cuda:0 using chunk size 10000, batch size 320
[2024-09-30 15:37:45.869] [info] cuda:0 using chunk size 5000, batch size 640
[2024-09-30 15:37:48.673] [info] > Simplex reads basecalled: 1
[2024-09-30 15:37:48.673] [info] > Basecalled @ Samples/s: 2.033932e+03
[2024-09-30 15:37:48.673] [info] > Finished
I was monitoring gpu activity with nvtop
and saw a spike in GPU activity when running this ā
Double-checked the SAM file that was produced and it looks good:
# samtools view basecalled.sam
c4b111a0-90eb-436e-b6b1-cf14dee1fb93 4 * 0 0 * * 0 0 TATGTCTCTGGTTCGGTTGGTCTTGCTAGACACAGGAAGGGGGCCAGGGTGTCAGAGAGCAGAAGATGGGGTGAGGAGTGGTGGGAGCCAGCGTGGAAGGTGTTGACTCTATGGTGACCTGGGTCCCCTCCTGCACCAAGTGGGGTGGCAGTGAGCAGGGTGACTGTCGTCTATGCT $$'(($##"##'+*((((*++,,--.4322236465329**3/BC>====CAAAAAEECDD5))));9;;BFKKIDHF>>>>>GA@BCEDA?999::IGEDDA@54//))))&&&''(((,23(CCDDGEDCEFDBCCABA@@CDDJKOKKHMGEEEFJHGCCABABBBBCDBCCDB qs:f:14.8748 du:f:0.512 ns:i:2048 ts:i:10 mx:i:1 ch:i:1 st:Z:2023-11-25T19:15:40.684+00:00 rn:i:1 fn:Z:dna_r10.4.1_e8.2_260bps-FLO_PRO114-SQK_NBD114_96_260-4000.pod5 sm:f:920.55 sd:f:179.67 sv:Z:quantile dx:i:0 RG:Z:test_dna_r10.4.1_e8.2_260bps_sup@v3.5.2 mv:B:c,5,1,0,1,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,1,1,1,1,0,0,1,1,1,1,0,1,0,1,0,1,0,1,0,1,1,0,0,1,0,0,1,0,1,0,1,0,1,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,1,1,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,1,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,1,1,1,1,0,1,0,0,1,0,0,1,1,0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,0,0,1,0,0,0,0,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,0,1,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,0,1,0,1,1,0,1,1,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,1,1,0,0,0,1,0,1,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,1,1,1,0,1,0,1,1,0,0,0,1,0,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,1,0,1,0
Thanks for your patience with all the requested changes and testing. GPU-enabled software is not super common our collection of containers so I want to ensure it runs smoothly from the start š
deploy workflow might fail, but we will see: https://github.com/StaPH-B/docker-builds/actions/runs/11109669669
If it does I can deploy manually to dockerhub and quay
I deployed the docker image manually. The hard drive is filling up on the github actions runner.
This pull request adds a Dockerfile and accompanying README for Dorado version 0.8.0.
Dorado is a high-performance, open-source tool developed by Oxford Nanopore Technologies for basecalling Oxford Nanopore sequencing data. It supports both CPU and GPU acceleration, providing rapid and accurate basecalling of Fast5/Pod5 files.
Key features of this Docker image:
Dorado Version 0.8.0: Includes the latest stable release of Dorado. Pre-downloaded Basecalling Models: All necessary basecalling models are downloaded during the build process and stored in /dorado_models. Sample Pod5 Test File: A sample Pod5 file is included for testing purposes. Internal Test Stage: The Dockerfile includes an internal test stage that runs during the build process to ensure Dorado is installed correctly and functioning as expected. NVIDIA CUDA Support: Based on the NVIDIA CUDA 12.2.0 base image to enable GPU acceleration (requires an NVIDIA GPU and the NVIDIA Container Toolkit).
The README.md for Dorado 0.8.0 is longer than 30 lines because it includes detailed instructions and explanations necessary for users to effectively build, run, and test the Docker image. Given that Dorado utilizes GPU acceleration, it's important to provide comprehensive guidance.
Demonstration of GPU Functionality I have tested the Dorado 0.8.0 Docker image on a GPU-enabled Linux machine to confirm that it utilizes GPU acceleration as intended.
System Details:
GPU Model: NVIDIA Tesla T4 Driver Version: 460.32.03 CUDA Version: 12.2 Operating System: Ubuntu 20.04
nvidia-smi
Output:========== == CUDA ==
CUDA Version 12.2.0
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License. By pulling and using the container, you accept the terms and conditions of this license: https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
[2024-09-20 20:28:50.255] [info] Running: "basecaller" "/dorado_models/dna_r10.4.1_e8.2_260bps_sup@v3.5.2" "/usr/src/app/dna_r10.4.1_e8.2_260bps-FLO_PRO114-SQK_NBD114_96_260-4000.pod5" "--emit-moves" [2024-09-20 20:28:50.375] [info] > Creating basecall pipeline [2024-09-20 20:28:52.273] [warning] Unable to find chunk benchmarks for GPU "Tesla T4", model /dorado_models/dna_r10.4.1_e8.2_260bps_sup@v3.5.2 and chunk size 1440. Full benchmarking will run for this device, which may take some time. [2024-09-20 20:29:08.590] [info] cuda:0 using chunk size 10000, batch size 256 [2024-09-20 20:29:10.402] [info] cuda:0 using chunk size 5000, batch size 640 [2024-09-20 20:29:15.202] [info] > Simplex reads basecalled: 1 [2024-09-20 20:29:15.202] [info] > Basecalled @ Samples/s: 8.841649e+02 [2024-09-20 20:29:15.202] [info] > Finished
Pull Request (PR) checklist:
docker build --tag samtools:1.15test --target test docker-builds/samtools/1.15
)spades/3.12.0/Dockerfile
)shigatyper/2.0.1/test.sh
)spades/3.12.0/README.md
)