Skip to content

Commit eb24124

Browse files
committed
Merge branch 'slee/move-dev-quickstart-to-devmd' into 'release-v0.7'
Move developer quickstart and extend installation instructions See merge request machine-learning/dorado!1033
2 parents 45b8acc + 03881c3 commit eb24124

File tree

2 files changed

+82
-56
lines changed

2 files changed

+82
-56
lines changed

DEV.md

+66-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
1-
## Setup notes
1+
# Developer Quickstart
22

3-
Dorado requires CUDA 11.8 on linux platforms. If the system you are running on does not have CUDA 11.8 installed, and you do not have sudo privileges, you can install locally from a run file as follows:
3+
## Dependencies
4+
5+
### Pre-commit
6+
7+
The project uses pre-commit to ensure code is consistently formatted; you can set this up using pip:
8+
9+
```bash
10+
$ pip install pre-commit
11+
$ pre-commit install
12+
```
13+
14+
### Linux dependencies
15+
16+
The following packages are necessary to build Dorado in a barebones environment (e.g. the official ubuntu:jammy Docker image).
17+
18+
```
19+
$ apt-get update && apt-get install -y --no-install-recommends \
20+
curl \
21+
git \
22+
ca-certificates \
23+
build-essential \
24+
libhdf5-dev \
25+
libssl-dev \
26+
libzstd-dev \
27+
autoconf \
28+
automake
29+
$ apt install gcc-9 g++-9 --no-install-recommends
30+
$ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
31+
```
32+
33+
This project requires `cmake 3.23` or higher. This can be installed via binary download from [cmake.org](https://cmake.org/download/) or using `python3-venv`:
34+
35+
```
36+
$ apt install python3-venv
37+
$ python3 -m venv venv
38+
$ . venv/bin/activate
39+
$ pip install "cmake>=3.23"
40+
```
41+
42+
Dorado requires CUDA 11.8 on Linux platforms. If the system you are running on does not have CUDA 11.8 installed, and you do not have sudo privileges, you can install locally from a run file as follows:
443

544
```
645
$ wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run
@@ -13,17 +52,18 @@ In this case, cmake should be invoked with `CUDAToolkit_ROOT` in order to tell t
1352
$ cmake -DCUDAToolkit_ROOT=~/dorado_deps/cuda11.8 -S . -B cmake-build
1453
```
1554

16-
Note that a [suitable NVIDIA driver](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#id3) will be required in order to run dorado.
55+
Note that a [suitable NVIDIA driver](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#id3) will be required in order to run Dorado.
56+
57+
All other dependencies will be fetched automatically by the cmake build process.
1758

18-
All other dependencies will be fetched automatically by the cmake build process.
1959

2060
If libtorch is already downloaded on the host system and you do not wish the build process to re-download it, you can specify `DORADO_LIBTORCH_DIR` to cmake, in order to specify where the build process should locate it. For example:
2161

2262
```
2363
$ cmake -DDORADO_LIBTORCH_DIR=/usr/local/libtorch -S . -B cmake-build
2464
```
2565

26-
### OSX
66+
### OSX dependencies
2767

2868
On OSX, version 2.69 of autoconf is required:
2969

@@ -35,5 +75,25 @@ $ brew link autoconf@2.69
3575

3676
The following other packages need to be available as well
3777
```bash
38-
brew install openssl zstd
78+
$ brew install openssl zstd
79+
```
80+
81+
### Clone and build
82+
83+
```
84+
$ git clone https://github.com/nanoporetech/dorado.git dorado
85+
$ cd dorado
86+
$ cmake -S . -B cmake-build
87+
$ cmake --build cmake-build --config Release -j
88+
$ ctest --test-dir cmake-build
89+
```
90+
91+
The `-j` flag will use all available threads to build Dorado and usage is around 1-2 GB per thread. If you are constrained
92+
by the amount of available memory on your system, you can lower the number of threads i.e.` -j 4`.
93+
94+
After building, you can run Dorado from the build directory `./cmake-build/bin/dorado` or install it somewhere else on your
95+
system i.e. `/opt` *(note: you will need the relevant permissions for the target installation directory)*.
96+
97+
```
98+
$ cmake --install cmake-build --prefix /opt
3999
```

README.md

+16-50
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,27 @@ If you encounter any problems building or running Dorado, please [report an issu
2020

2121
## Installation
2222

23+
First, download the relevant installer for your platform:
24+
2325
- [dorado-0.7.0-linux-x64](https://cdn.oxfordnanoportal.com/software/analysis/dorado-0.7.0-linux-x64.tar.gz)
2426
- [dorado-0.7.0-linux-arm64](https://cdn.oxfordnanoportal.com/software/analysis/dorado-0.7.0-linux-arm64.tar.gz)
2527
- [dorado-0.7.0-osx-arm64](https://cdn.oxfordnanoportal.com/software/analysis/dorado-0.7.0-osx-arm64.zip)
2628
- [dorado-0.7.0-win64](https://cdn.oxfordnanoportal.com/software/analysis/dorado-0.7.0-win64.zip)
2729

30+
Once the relevant `.tar.gz` or `.zip` archive is downloaded, extract the archive to your desired location.
31+
32+
You can then call Dorado using the full path, for example:
33+
```
34+
$ /path/to/dorado-x.y.z-linux-x64/bin/dorado basecaller hac pod5s/ > calls.bam
35+
```
36+
37+
Or you can add the bin path to your `$PATH` environment variable, and run with the `dorado` command instead, for example:
38+
```
39+
$ dorado basecaller hac pod5s/ > calls.bam
40+
```
41+
42+
See [DEV.md](DEV.md) for details about building Dorado for development.
43+
2844
## Platforms
2945

3046
Dorado is heavily-optimised for Nvidia A100 and H100 GPUs and will deliver maximal performance on systems with these GPUs.
@@ -408,56 +424,6 @@ Here are a few examples of model complexes:
408424
| sup,5mCG_5hmCG,6mA | Latest compatible **sup** model and latest compatible **5mCG_5hmCG** and **6mA** modifications models |
409425

410426

411-
## Developer quickstart
412-
413-
### Linux dependencies
414-
415-
The following packages are necessary to build Dorado in a barebones environment (e.g. the official ubuntu:jammy docker image).
416-
417-
```
418-
$ apt-get update && apt-get install -y --no-install-recommends \
419-
curl \
420-
git \
421-
ca-certificates \
422-
build-essential \
423-
nvidia-cuda-toolkit \
424-
libhdf5-dev \
425-
libssl-dev \
426-
libzstd-dev \
427-
cmake \
428-
autoconf \
429-
automake
430-
```
431-
432-
### Clone and build
433-
434-
```
435-
$ git clone https://github.com/nanoporetech/dorado.git dorado
436-
$ cd dorado
437-
$ cmake -S . -B cmake-build
438-
$ cmake --build cmake-build --config Release -j
439-
$ ctest --test-dir cmake-build
440-
```
441-
442-
The `-j` flag will use all available threads to build Dorado and usage is around 1-2 GB per thread. If you are constrained
443-
by the amount of available memory on your system, you can lower the number of threads i.e.` -j 4`.
444-
445-
After building, you can run Dorado from the build directory `./cmake-build/bin/dorado` or install it somewhere else on your
446-
system i.e. `/opt` *(note: you will need the relevant permissions for the target installation directory)*.
447-
448-
```
449-
$ cmake --install cmake-build --prefix /opt
450-
```
451-
452-
### Pre-commit
453-
454-
The project uses pre-commit to ensure code is consistently formatted; you can set this up using pip:
455-
456-
```bash
457-
$ pip install pre-commit
458-
$ pre-commit install
459-
```
460-
461427
## Troubleshooting Guide
462428

463429
### Library Path Errors

0 commit comments

Comments
 (0)