-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sh
executable file
·84 lines (72 loc) · 2.17 KB
/
build.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
76
77
78
79
80
81
82
83
84
#!/bin/bash
TAG_VERSION=1.0.8
function buildDockerImage() {
IMAGE=$1
FILE=$2
docker build -t $IMAGE -f $FILE .
docker tag $IMAGE beehivelab/$IMAGE:$TAG_VERSION
docker tag $IMAGE beehivelab/$IMAGE:latest
}
function nvidiaJDK21() {
buildDockerImage "tornadovm-nvidia-openjdk" "dockerFiles/Dockerfile.nvidia.jdk21"
}
function nvidiaGraalVMJDK21() {
buildDockerImage "tornadovm-nvidia-graalvm" "dockerFiles/Dockerfile.nvidia.graalvm.jdk21"
}
function nvidiaARM() {
buildDockerImage "tornadovm-nvidia-graalvm-arm" "dockerFiles/Dockerfile.nvidia.graalvm.ptx.jdk21"
}
function intelJDK21() {
buildDockerImage "tornadovm-intel-openjdk" "dockerFiles/Dockerfile.oneapi.intel.jdk21"
}
function intelGraalVMJDK21() {
buildDockerImage "tornadovm-intel-graalvm" "dockerFiles/Dockerfile.oneapi.intel.graalvm.jdk21"
}
function printHelp() {
echo "TornadoVM Docker Build"
echo -e "\nOptions: "
echo "Builds for NVIDIA Compute Platforms: GPUs"
echo " --nvidia-jdk21 (OpenCL) : Build Docker Image for NVIDIA GPUs using JDK21"
echo " --nvidia-graalVM-JDK21 (OpenCL) : Build Docker Image for NVIDIA GPUs using GraalVM JDK21"
echo -e "\nBuilds for Intel Compute Platforms: Integrated GPUs, Intel CPUs and FPGAs (Emulation Mode)"
echo " --intel-jdk21 (OpenCL) : Build Docker Image for Intel Integrated GPUs, Intel CPUs, and Intel FPGAs using JDK21"
echo " --intel-graalVM-JDK21 (OpenCL) : Build Docker Image for Intel Integrated GPUs, Intel CPUs, and Intel FPGAs using GraalVM JDK21"
echo "Builds for NVIDIA-ARM Compute Platforms: GPUs"
echo " --nvidia-arm-graalVM-JDK17 (PTX): Build Docker Image for NVIDIA GPUs using GraalVM JDK11"
exit 0
}
POSITIONAL=()
if [[ $# == 0 ]]
then
printHelp
exit
fi
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--help)
printHelp
shift
;;
--nvidia-jdk21)
nvidiaJDK21
shift
;;
--nvidia-graalVM-JDK21)
nvidiaGraalVMJDK21
shift
;;
--intel-jdk21)
intelJDK21
shift
;;
--intel-graalVM-JDK21)
intelGraalVMJDK21
shift
;;
--nvidia-arm-graalVM-JDK21)
nvidiaARM
shift
;;
esac
done