File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ TAG_VERSION=v0.1.0-beta
4
+
5
+ function buildDockerImage() {
6
+ IMAGE=$1
7
+ FILE=$2
8
+ docker build --progress=plain -t $IMAGE -f $FILE .
9
+ docker tag $IMAGE beehivelab/$IMAGE :$TAG_VERSION
10
+ docker tag $IMAGE beehivelab/$IMAGE :latest
11
+ }
12
+
13
+ function nvidiaJDK21OCL() {
14
+ docker volume create data
15
+ buildDockerImage " gpullama3.java-nvidia-openjdk-opencl" " dockerFiles/Dockerfile.nvidia.jdk21.ocl"
16
+ }
17
+
18
+ function nvidiaJDK21PTX() {
19
+ docker volume create data
20
+ buildDockerImage " gpullama3.java-nvidia-openjdk-ptx" " dockerFiles/Dockerfile.nvidia.jdk21.ptx"
21
+ }
22
+
23
+ function printHelp() {
24
+ echo " GPULlama3.java Docker Build"
25
+ echo -e " \nOptions: "
26
+ echo " Builds for NVIDIA Compute Platforms: GPUs"
27
+ echo " --nvidia-jdk21-ocl (OpenCL) : Build Docker Image for NVIDIA GPUs using JDK21 and OpenCL"
28
+ echo " --nvidia-jdk21-ptx (PTX) : Build Docker Image for NVIDIA GPUs using JDK21 and PTX"
29
+ exit 0
30
+ }
31
+
32
+ POSITIONAL=()
33
+
34
+ if [[ $# == 0 ]]
35
+ then
36
+ printHelp
37
+ exit
38
+ fi
39
+
40
+ while [[ $# -gt 0 ]]; do
41
+ key=" $1 "
42
+ case $key in
43
+ --help)
44
+ printHelp
45
+ shift
46
+ ;;
47
+ --nvidia-jdk21-ocl)
48
+ nvidiaJDK21OCL
49
+ shift
50
+ ;;
51
+ --nvidia-jdk21-ptx)
52
+ nvidiaJDK21PTX
53
+ shift
54
+ ;;
55
+ esac
56
+ done
You can’t perform that action at this time.
0 commit comments