Skip to content

Commit 941283c

Browse files
committed
wip: Try to get llama.cpp to work
1 parent a761948 commit 941283c

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

Dockerfile.agentic

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ ENV LLAMA_ARG_PORT="${PORT}"
3939
# %files
4040
#
4141
COPY --chmod=0755 --chown=${USER_NAME}:${USER_NAME} ./provision/healthcheck /healthcheck
42-
COPY --chmod=0755 ./provision/agentic/* /tmp/scripts/
43-
COPY --chmod=0755 ./config/llama.cpp/service/* /etc/services.d/llama.cpp/
42+
COPY --chmod=0755 --chown=${USER_NAME}:${USER_NAME} ./config/llama.cpp/service/* /etc/services.d/llama.cpp/
43+
COPY --chmod=0755 --chown=${USER_NAME}:${USER_NAME} ./provision/agentic/* /tmp/scripts/
4444
#
4545
# %post
4646
#
@@ -56,7 +56,7 @@ RUN --mount=type=secret,id=HF_API_TOKEN,env=HF_API_TOKEN \
5656
mkdir -p "${MODEL_DIRECTORY}" && chmod 777 "${MODEL_DIRECTORY}" \
5757
&& eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" \
5858
&& brew install --force hf llama.cpp \
59-
&& hf download "${HF_REPO}" --local-dir "${MODEL_DIRECTORY}" --token "${HF_API_TOKEN}"
59+
&& hf download "${HF_REPO}" --token "${HF_API_TOKEN}"
6060
USER root
6161
RUN cleanup
6262
#
@@ -66,6 +66,6 @@ USER "${USER_NAME}"
6666
WORKDIR "${HOME}/dev"
6767
SHELL ["/bin/bash", "-c"]
6868
HEALTHCHECK --interval=5m --timeout=30s --start-period=10s --retries=3 \
69-
CMD ["/bin/bash", "-c", "/healthcheck"]
69+
CMD ["/bin/bash", "-c", "/healthcheck", "agentic"]
7070
ENTRYPOINT [ "/init" ]
7171
CMD ["/bin/zsh"]

Dockerfile.notebook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LABEL org.opencontainers.image.licenses=MIT
1313
ARG IMAGE=notebook
1414
ARG USER_NAME=nonroot
1515
ARG HOME="/home/${USER_NAME}"
16-
ARG MAMBA_VERSION=2.6.2
16+
ARG MAMBA_VERSION=2.7.0
1717
ARG VERDACCIO_VERSION=6.2.4
1818
#
1919
# %environment

config/llama.cpp/service/run

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

3-
PORT=${LLAMA_ARG_PORT:-1720}
4-
"${HOME}/llamacpp/llama-server" \
4+
/home/linuxbrew/.linuxbrew/bin/llama-server \
55
--jinja \
6-
--offline \
7-
--port "${PORT}" \
86
--ssl-key-file "${HOME}/certs/my.key" \
9-
--ssl-cert-file "${HOME}/certs/my.pem" >> /etc/services.d/$1/log 2>&1
7+
--ssl-cert-file "${HOME}/certs/my.pem" >> /etc/services.d/"$1"/log 2>&1

provision/healthcheck

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LOG_FILE="${HOME:-/home/nonroot}/healthcheck.log"
55
exec 1>>"${LOG_FILE}" 2>&1
66

77
HOST="${HEALTHCHECK_HOST:-localhost}"
8-
IMAGE="${IMAGE:-notebook}"
8+
IMAGE="${1:-notebook}"
99
CODE_SERVER_PORT="${CODE_SERVER_PORT:-1337}"
1010
VERDACCIO_PORT="${VERDACCIO_PORT:-4873}"
1111
JUPYTER_PORT="${JUPYTER_PORT:-13337}"

0 commit comments

Comments
 (0)