File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ ARG LLAMA_SERVER_VARIANT
4040# Create non-root user
4141RUN groupadd --system modelrunner && useradd --system --gid modelrunner --create-home --home-dir /home/modelrunner modelrunner
4242
43+ COPY scripts/apt-install.sh apt-install.sh
44+
45+ # Install ca-certificates for HTTPS and vulkan
46+ RUN ./apt-install.sh
47+
4348# Install ca-certificates for HTTPS and vulkan
4449RUN apt-get update && \
4550 packages="ca-certificates" && \
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ MODELS_PATH := $(shell pwd)/models-store
1010LLAMA_ARGS ?=
1111
1212# Main targets
13- .PHONY : build run clean test docker-build docker-run help
13+ .PHONY : build run clean test docker-build docker-run help validate
1414
1515# Default target
1616.DEFAULT_GOAL := help
3434test :
3535 go test -v ./...
3636
37+ validate :
38+ find . -name ' *.sh' -exec shellcheck {} +
39+
3740# Build Docker image
3841docker-build :
3942 docker buildx build \
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ main () {
4+ set -eux -o pipefail
5+
6+ apt-get update
7+ local packages=(" ca-certificates" )
8+ if [ " ${LLAMA_SERVER_VARIANT} " = " generic" ] || [ " ${LLAMA_SERVER_VARIANT} " = " cpu" ]; then
9+ packages+=(" libvulkan1" )
10+ fi
11+
12+ apt-get install -y --no-install-recommends " ${packages[@]} "
13+ rm -rf /var/lib/apt/lists/*
14+ }
15+
16+ main " $@ "
17+
You can’t perform that action at this time.
0 commit comments