-
Notifications
You must be signed in to change notification settings - Fork 11
/
herro-singularity.def
56 lines (43 loc) · 1.33 KB
/
herro-singularity.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Bootstrap: docker
From: nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04
Stage: devel
%files
* /herro/
%post
# Get essential packages
apt-get update
apt-get install -y wget git unzip curl build-essential zlib1g-dev zstd
# Build minimap2
git clone https://github.com/lh3/minimap2.git && cd minimap2 && make
cd /
# Download rustc
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH="/root/.cargo/bin:${PATH}"
# Get libtorch
wget -q -O libtorch.zip https://download.pytorch.org/libtorch/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcu117.zip
unzip -q libtorch.zip && rm libtorch.zip
export LIBTORCH=/libtorch
export LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH
# build
cd herro
RUSTFLAGS="-Ctarget-cpu=native" cargo build -q --release
Bootstrap: docker
From: nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04
Stage: final
%files from devel
/minimap2/minimap2 /bin/minimap2
/herro/target/release/herro /bin/herro
/libtorch /libs/
%environment
export LIBTORCH=/libs/libtorch
export LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH
%post
# Get essential packages
apt-get update
apt-get install -y libgomp1 zlib1g-dev zstd
%runscript
herro "$@"
%labels
Author Dominik Stanojevic
Version v0.2.0
Name herro