File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,15 @@ DOCKER_TAG_BASE_BUILD="${DOCKER_REGISTRY}/cuda-dev-${OS}-${ARCH}:${VERSION}"
17
17
DOCKER_TAG_BASE_RUNTIME ="${DOCKER_REGISTRY}/cuda-rt-${OS}-${ARCH}:${VERSION}"
18
18
DOCKER_TAG_LLAMACPP ="${DOCKER_REGISTRY}/llamacpp-${OS}-${ARCH}:${VERSION}"
19
19
20
+ # ONNXRuntime flags
21
+ ONNXRUNTIME_FLAGS := --config Release --build_shared_lib
22
+
23
+ # CUDA
24
+ ifdef CUDA_HOME
25
+ GGML_CUDA := 1
26
+ ONNXRUNTIME_FLAGS += --use_cuda --cuda_home=${CUDA_HOME} --cudnn_home=${CUDA_HOME}
27
+ endif
28
+
20
29
# Base images for building and running CUDA containers
21
30
docker-base : docker-dep
22
31
@echo " Building ${DOCKER_TAG_BASE_BUILD} "
@@ -49,7 +58,11 @@ llamacpp: submodule-checkout
49
58
50
59
onnxruntime : submodule-checkout
51
60
@echo " Building onnxruntime"
52
- @cd onnxruntime && ./build.sh --config Release --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync
61
+ @cd onnxruntime && ./build.sh \
62
+ --parallel \
63
+ --compile_no_warning_as_error \
64
+ --skip_submodule_sync \
65
+ ${ONNXRUNTIME_FLAGS}
53
66
54
67
# Push docker container
55
68
docker-push : docker-dep
Original file line number Diff line number Diff line change @@ -24,7 +24,14 @@ You can then access the Llama server on port 8080.
24
24
25
25
## Building
26
26
27
- The following will build the docker image and push to the repository:
27
+ To build either the llama.cpp library or the onnxruntime library:
28
+
29
+ ``` bash
30
+ CUDA_HOME=/usr/local/cuda make llamacpp onnxruntime
31
+ ```
32
+
33
+ You can omit the CUDA_HOME environment variable if you don't want to build with CUDA support.
34
+ The following will build a docker image and push to the repository:
28
35
29
36
``` bash
30
37
git checkout git@github.com:mutablelogic/docker-llamacpp.git
You can’t perform that action at this time.
0 commit comments