forked from remicres/otbtf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multibuild.sh
75 lines (63 loc) · 1.6 KB
/
multibuild.sh
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Various docker builds using bazel cache
RELEASE=3.5
CPU_IMG=ubuntu:22.04
GPU_IMG=nvidia/cuda:12.1.0-devel-ubuntu22.04
## Bazel remote cache daemon
mkdir -p $HOME/.cache/bazel-remote
docker run -d -u 1000:1000 \
-v $HOME/.cache/bazel-remote:/data \
-p 9090:8080 \
buchgr/bazel-remote-cache --max_size=20
### CPU images
# CPU-Dev
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-cpu-dev \
--build-arg BASE_IMG=$CPU_IMG \
--build-arg KEEP_SRC_OTB=true
# CPU
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-cpu \
--build-arg BASE_IMG=$CPU_IMG
# CPU-GUI
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-cpu-gui \
--build-arg BASE_IMG=$CPU_IMG \
--build-arg GUI=true
### CPU images with Intel MKL support
MKL_CONF="--config=nogcp --config=noaws --config=nohdfs --config=mkl --config=opt"
# CPU-MKL
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-cpu-mkl \
--build-arg BASE_IMG=$CPU_IMG \
--build-arg BZL_CONFIGS="$MKL_CONF"
# CPU-MKL-Dev
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-cpu-mkl-dev \
--build-arg BASE_IMG=$CPU_IMG \
--build-arg BZL_CONFIGS="$MKL_CONF" \
--build-arg KEEP_SRC_OTB=true
### GPU enabled images
# Support is enabled if CUDA is found in /usr/local
# GPU
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-gpu-dev \
--build-arg BASE_IMG=$GPU_IMG \
--build-arg KEEP_SRC_OTB=true
# GPU-Dev
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-gpu \
--build-arg BASE_IMG=$GPU_IMG
# GPU-GUI
docker build . \
--network='host' \
-t mdl4eo/otbtf:$RELEASE-gpu-gui \
--build-arg BASE_IMG=$GPU_IMG \
--build-arg GUI=true