From 86f74d61e73477a3407b8dbb75dcbd4123d210a3 Mon Sep 17 00:00:00 2001 From: Nick von Pentz Date: Tue, 22 Oct 2024 12:07:59 -0400 Subject: [PATCH 1/4] Add Dockerfile --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..11a43fe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Use vLLM's vllm-openai server image as the base +FROM vllm/vllm-openai:latest + +# Set working directory +WORKDIR /workspace + +# Install necessary build dependencies for sentencepiece +RUN apt-get update && apt-get install -y \ + pkg-config \ + cmake \ + build-essential + +# Copy functionary code and requirements into workspace +COPY . . + +# Install additional Python dependencies +RUN --mount=type=cache,target=/root/.cache/pip \ + python3 -m pip install -r requirements.txt + +# Override the VLLM entrypoint with the functionary server +ENTRYPOINT ["python3", "server_vllm.py", "--model", "meetkai/functionary-small-v3.2", "--host", "0.0.0.0", "--max-model-len", "8192"] From 786864327dc7ba2f5d871f2fb63138f319b5c984 Mon Sep 17 00:00:00 2001 From: Nick von Pentz Date: Tue, 5 Nov 2024 16:24:49 -0500 Subject: [PATCH 2/4] Update Dockerfile * Allow overriding of entrypoint arguments with CMD [] * Make WORKDIR an argument * Pin to specific vllm-openai image --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11a43fe..524cbfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ # Use vLLM's vllm-openai server image as the base -FROM vllm/vllm-openai:latest +FROM vllm/vllm-openai:v0.6.3.post1 -# Set working directory -WORKDIR /workspace +# Define a build argument for the working directory, defaulting to /workspace +ARG WORKDIR_ARG=/workspace + +# Set the working directory +WORKDIR ${WORKDIR_ARG} # Install necessary build dependencies for sentencepiece RUN apt-get update && apt-get install -y \ @@ -19,3 +22,4 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # Override the VLLM entrypoint with the functionary server ENTRYPOINT ["python3", "server_vllm.py", "--model", "meetkai/functionary-small-v3.2", "--host", "0.0.0.0", "--max-model-len", "8192"] +CMD [] From 230e2a3f5406c7e3ead0cb293dc8c8032d2dff7f Mon Sep 17 00:00:00 2001 From: Nick von Pentz Date: Tue, 12 Nov 2024 09:53:55 -0500 Subject: [PATCH 3/4] Install pip deps from pyproject.toml not requirements.txt --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 524cbfc..d90b9f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ COPY . . # Install additional Python dependencies RUN --mount=type=cache,target=/root/.cache/pip \ - python3 -m pip install -r requirements.txt + python3 -m pip install .[vllm] # Override the VLLM entrypoint with the functionary server ENTRYPOINT ["python3", "server_vllm.py", "--model", "meetkai/functionary-small-v3.2", "--host", "0.0.0.0", "--max-model-len", "8192"] From 37332ed542a0ca41b58c8f0d4af013ddd302aa96 Mon Sep 17 00:00:00 2001 From: Jeffrey Fong Date: Mon, 13 Jan 2025 15:08:01 +0800 Subject: [PATCH 4/4] move dockerfile to dockerfiles dir --- Dockerfile => dockerfiles/Dockerfile.vllm | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Dockerfile => dockerfiles/Dockerfile.vllm (100%) diff --git a/Dockerfile b/dockerfiles/Dockerfile.vllm similarity index 100% rename from Dockerfile rename to dockerfiles/Dockerfile.vllm