From 0918d5cb9621d8a24169c16820201737e3e57ff7 Mon Sep 17 00:00:00 2001 From: Michael Clifford Date: Wed, 27 Mar 2024 16:28:22 -0400 Subject: [PATCH 1/3] replace playground with model_servers Signed-off-by: Michael Clifford --- chatbot/ai-lab.yaml | 4 ++-- code-generation/ai-lab.yaml | 4 ++-- model_servers/llamacpp/src/run.sh | 2 -- {playground => model_servers/llamacpp_python}/README.md | 0 .../{llamacpp => llamacpp_python}/base/Containerfile | 2 +- .../{llamacpp => llamacpp_python}/cuda/Containerfile | 0 .../{llamacpp => llamacpp_python}/cuda/README.md | 0 .../{llamacpp => llamacpp_python}/src/requirements.txt | 0 {playground => model_servers/llamacpp_python/src}/run.sh | 0 .../llamacpp_python}/tooling_options.ipynb | 0 .../{llamacpp => llamacpp_python}/vulkan/Containerfile | 0 playground/Containerfile | 8 -------- playground/requirements.txt | 1 - rag/ai-lab.yaml | 4 ++-- summarizer-langchain/ai-lab.yaml | 4 ++-- 15 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 model_servers/llamacpp/src/run.sh rename {playground => model_servers/llamacpp_python}/README.md (100%) rename model_servers/{llamacpp => llamacpp_python}/base/Containerfile (86%) rename model_servers/{llamacpp => llamacpp_python}/cuda/Containerfile (100%) rename model_servers/{llamacpp => llamacpp_python}/cuda/README.md (100%) rename model_servers/{llamacpp => llamacpp_python}/src/requirements.txt (100%) rename {playground => model_servers/llamacpp_python/src}/run.sh (100%) rename {playground => model_servers/llamacpp_python}/tooling_options.ipynb (100%) rename model_servers/{llamacpp => llamacpp_python}/vulkan/Containerfile (100%) delete mode 100644 playground/Containerfile delete mode 100644 playground/requirements.txt diff --git a/chatbot/ai-lab.yaml b/chatbot/ai-lab.yaml index 760155f9..a62e6f48 100644 --- a/chatbot/ai-lab.yaml +++ b/chatbot/ai-lab.yaml @@ -5,8 +5,8 @@ application: description: This is a Streamlit chat demo application. containers: - name: llamacpp-server - contextdir: ../playground - containerfile: Containerfile + contextdir: ../model_servers/llamacpp_python + containerfile: ./model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama diff --git a/code-generation/ai-lab.yaml b/code-generation/ai-lab.yaml index b91db12c..8e5febf9 100644 --- a/code-generation/ai-lab.yaml +++ b/code-generation/ai-lab.yaml @@ -5,8 +5,8 @@ application: description: This is a code-generation demo application. containers: - name: llamacpp-server - contextdir: ../playground - containerfile: Containerfile + contextdir: ../model_servers/llamacpp_python + containerfile: ./model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama diff --git a/model_servers/llamacpp/src/run.sh b/model_servers/llamacpp/src/run.sh deleted file mode 100644 index 5d313133..00000000 --- a/model_servers/llamacpp/src/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python -m llama_cpp.server --model ${MODEL_PATH} --host ${HOST:=0.0.0.0} --port ${PORT:=8001} --n_gpu_layers -1 diff --git a/playground/README.md b/model_servers/llamacpp_python/README.md similarity index 100% rename from playground/README.md rename to model_servers/llamacpp_python/README.md diff --git a/model_servers/llamacpp/base/Containerfile b/model_servers/llamacpp_python/base/Containerfile similarity index 86% rename from model_servers/llamacpp/base/Containerfile rename to model_servers/llamacpp_python/base/Containerfile index 362874f4..de459fb9 100644 --- a/model_servers/llamacpp/base/Containerfile +++ b/model_servers/llamacpp_python/base/Containerfile @@ -4,4 +4,4 @@ COPY src . RUN pip install --upgrade pip RUN pip install --no-cache-dir --upgrade -r /locallm/requirements.txt EXPOSE 8001 -ENTRYPOINT [ "sh", "run.sh" ] +ENTRYPOINT [ "sh", "run.sh" ] \ No newline at end of file diff --git a/model_servers/llamacpp/cuda/Containerfile b/model_servers/llamacpp_python/cuda/Containerfile similarity index 100% rename from model_servers/llamacpp/cuda/Containerfile rename to model_servers/llamacpp_python/cuda/Containerfile diff --git a/model_servers/llamacpp/cuda/README.md b/model_servers/llamacpp_python/cuda/README.md similarity index 100% rename from model_servers/llamacpp/cuda/README.md rename to model_servers/llamacpp_python/cuda/README.md diff --git a/model_servers/llamacpp/src/requirements.txt b/model_servers/llamacpp_python/src/requirements.txt similarity index 100% rename from model_servers/llamacpp/src/requirements.txt rename to model_servers/llamacpp_python/src/requirements.txt diff --git a/playground/run.sh b/model_servers/llamacpp_python/src/run.sh similarity index 100% rename from playground/run.sh rename to model_servers/llamacpp_python/src/run.sh diff --git a/playground/tooling_options.ipynb b/model_servers/llamacpp_python/tooling_options.ipynb similarity index 100% rename from playground/tooling_options.ipynb rename to model_servers/llamacpp_python/tooling_options.ipynb diff --git a/model_servers/llamacpp/vulkan/Containerfile b/model_servers/llamacpp_python/vulkan/Containerfile similarity index 100% rename from model_servers/llamacpp/vulkan/Containerfile rename to model_servers/llamacpp_python/vulkan/Containerfile diff --git a/playground/Containerfile b/playground/Containerfile deleted file mode 100644 index e47b81dd..00000000 --- a/playground/Containerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM registry.access.redhat.com/ubi9/python-39:latest -WORKDIR /locallm -COPY requirements.txt /locallm/requirements.txt -RUN pip install --upgrade pip -RUN pip install --no-cache-dir --upgrade -r /locallm/requirements.txt -COPY run.sh run.sh -EXPOSE 8001 -ENTRYPOINT [ "sh", "run.sh" ] diff --git a/playground/requirements.txt b/playground/requirements.txt deleted file mode 100644 index bbea3dd8..00000000 --- a/playground/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -llama-cpp-python[server] \ No newline at end of file diff --git a/rag/ai-lab.yaml b/rag/ai-lab.yaml index f8b39540..d47564cb 100644 --- a/rag/ai-lab.yaml +++ b/rag/ai-lab.yaml @@ -5,8 +5,8 @@ application: description: This is a RAG demo application. containers: - name: llamacpp-server - contextdir: ../playground - containerfile: Containerfile + contextdir: ../model_servers/llamacpp_python + containerfile: ./model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama diff --git a/summarizer-langchain/ai-lab.yaml b/summarizer-langchain/ai-lab.yaml index 65c9e3b1..1ccb58f5 100644 --- a/summarizer-langchain/ai-lab.yaml +++ b/summarizer-langchain/ai-lab.yaml @@ -5,8 +5,8 @@ application: description: This is a Streamlit demo application for summarizing text. containers: - name: llamacpp-server - contextdir: ../playground - containerfile: Containerfile + contextdir: ../model_servers/llamacpp_python + containerfile: ./model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama From 3223e3b1d58962fc8b02b6244203068c4c66969c Mon Sep 17 00:00:00 2001 From: Michael Clifford Date: Thu, 28 Mar 2024 09:30:52 -0400 Subject: [PATCH 2/3] add image understanding Signed-off-by: Michael Clifford --- chatbot/ai-lab.yaml | 2 +- code-generation/ai-lab.yaml | 2 +- image_understanding/ai-lab.yaml | 4 ++-- rag/ai-lab.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chatbot/ai-lab.yaml b/chatbot/ai-lab.yaml index a62e6f48..d05912f5 100644 --- a/chatbot/ai-lab.yaml +++ b/chatbot/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ./model_servers/llamacpp_python/base/Containerfile + containerfile: ../model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama diff --git a/code-generation/ai-lab.yaml b/code-generation/ai-lab.yaml index 8e5febf9..74d7b628 100644 --- a/code-generation/ai-lab.yaml +++ b/code-generation/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ./model_servers/llamacpp_python/base/Containerfile + containerfile: ../model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama diff --git a/image_understanding/ai-lab.yaml b/image_understanding/ai-lab.yaml index f6040387..6d35b5e6 100644 --- a/image_understanding/ai-lab.yaml +++ b/image_understanding/ai-lab.yaml @@ -4,8 +4,8 @@ application: description: This demo uses a Multimodal model to analyze the content of images. containers: - name: llamacpp-server - contextdir: ../playground - containerfile: Containerfile + contextdir: ../model_servers/llamacpp_python + containerfile: ../model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama diff --git a/rag/ai-lab.yaml b/rag/ai-lab.yaml index d47564cb..b5326523 100644 --- a/rag/ai-lab.yaml +++ b/rag/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ./model_servers/llamacpp_python/base/Containerfile + containerfile: ../model_servers/llamacpp_python/base/Containerfile model-service: true backend: - llama From 9598ecbb2446dba2818daf41ed814156c9e056cb Mon Sep 17 00:00:00 2001 From: Michael Clifford Date: Thu, 28 Mar 2024 10:05:35 -0400 Subject: [PATCH 3/3] fix containerfile location Signed-off-by: Michael Clifford --- chatbot/ai-lab.yaml | 2 +- code-generation/ai-lab.yaml | 2 +- image_understanding/ai-lab.yaml | 2 +- rag/ai-lab.yaml | 2 +- summarizer-langchain/ai-lab.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chatbot/ai-lab.yaml b/chatbot/ai-lab.yaml index d05912f5..6f0bbcc8 100644 --- a/chatbot/ai-lab.yaml +++ b/chatbot/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ../model_servers/llamacpp_python/base/Containerfile + containerfile: ./base/Containerfile model-service: true backend: - llama diff --git a/code-generation/ai-lab.yaml b/code-generation/ai-lab.yaml index 74d7b628..e18b075e 100644 --- a/code-generation/ai-lab.yaml +++ b/code-generation/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ../model_servers/llamacpp_python/base/Containerfile + containerfile: ./base/Containerfile model-service: true backend: - llama diff --git a/image_understanding/ai-lab.yaml b/image_understanding/ai-lab.yaml index 6d35b5e6..76e7ac96 100644 --- a/image_understanding/ai-lab.yaml +++ b/image_understanding/ai-lab.yaml @@ -5,7 +5,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ../model_servers/llamacpp_python/base/Containerfile + containerfile: ./base/Containerfile model-service: true backend: - llama diff --git a/rag/ai-lab.yaml b/rag/ai-lab.yaml index b5326523..599716f1 100644 --- a/rag/ai-lab.yaml +++ b/rag/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ../model_servers/llamacpp_python/base/Containerfile + containerfile: ./base/Containerfile model-service: true backend: - llama diff --git a/summarizer-langchain/ai-lab.yaml b/summarizer-langchain/ai-lab.yaml index 1ccb58f5..3062a51f 100644 --- a/summarizer-langchain/ai-lab.yaml +++ b/summarizer-langchain/ai-lab.yaml @@ -6,7 +6,7 @@ application: containers: - name: llamacpp-server contextdir: ../model_servers/llamacpp_python - containerfile: ./model_servers/llamacpp_python/base/Containerfile + containerfile: ./base/Containerfile model-service: true backend: - llama