Skip to content

Commit 925c309

Browse files
authored
Add healthchecks to llama-server containers (#8081)
* added healthcheck * added healthcheck * added healthcheck * added healthcheck * added healthcheck * moved curl to base * moved curl to base
1 parent c8ad359 commit 925c309

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

.devops/llama-server-cuda.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ RUN make -j$(nproc) llama-server
3030
FROM ${BASE_CUDA_RUN_CONTAINER} as runtime
3131

3232
RUN apt-get update && \
33-
apt-get install -y libcurl4-openssl-dev libgomp1
33+
apt-get install -y libcurl4-openssl-dev libgomp1 curl
3434

3535
COPY --from=build /app/llama-server /llama-server
3636

37+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
38+
3739
ENTRYPOINT [ "/llama-server" ]

.devops/llama-server-intel.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ RUN if [ "${LLAMA_SYCL_F16}" = "ON" ]; then \
2020
FROM intel/oneapi-basekit:$ONEAPI_VERSION as runtime
2121

2222
RUN apt-get update && \
23-
apt-get install -y libcurl4-openssl-dev
23+
apt-get install -y libcurl4-openssl-dev curl
2424

2525
COPY --from=build /app/build/bin/llama-server /llama-server
2626

2727
ENV LC_ALL=C.utf8
2828

29+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
30+
2931
ENTRYPOINT [ "/llama-server" ]

.devops/llama-server-rocm.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ ENV CXX=/opt/rocm/llvm/bin/clang++
4343
# Enable cURL
4444
ENV LLAMA_CURL=1
4545
RUN apt-get update && \
46-
apt-get install -y libcurl4-openssl-dev
46+
apt-get install -y libcurl4-openssl-dev curl
4747

4848
RUN make -j$(nproc) llama-server
4949

50+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
51+
5052
ENTRYPOINT [ "/app/llama-server" ]

.devops/llama-server-vulkan.Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ FROM ubuntu:$UBUNTU_VERSION as build
55
# Install build tools
66
RUN apt update && apt install -y git build-essential cmake wget
77

8-
# Install Vulkan SDK
8+
# Install Vulkan SDK and cURL
99
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \
1010
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \
1111
apt update -y && \
12-
apt-get install -y vulkan-sdk
13-
14-
# Install cURL
15-
RUN apt-get update && \
16-
apt-get install -y libcurl4-openssl-dev
12+
apt-get install -y vulkan-sdk libcurl4-openssl-dev curl
1713

1814
# Build it
1915
WORKDIR /app
@@ -28,4 +24,6 @@ RUN cp /app/build/bin/llama-server /llama-server && \
2824

2925
ENV LC_ALL=C.utf8
3026

27+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
28+
3129
ENTRYPOINT [ "/llama-server" ]

.devops/llama-server.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG UBUNTU_VERSION=22.04
33
FROM ubuntu:$UBUNTU_VERSION as build
44

55
RUN apt-get update && \
6-
apt-get install -y build-essential git libcurl4-openssl-dev
6+
apt-get install -y build-essential git libcurl4-openssl-dev curl
77

88
WORKDIR /app
99

@@ -22,4 +22,6 @@ COPY --from=build /app/llama-server /llama-server
2222

2323
ENV LC_ALL=C.utf8
2424

25+
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
26+
2527
ENTRYPOINT [ "/llama-server" ]

0 commit comments

Comments
 (0)