Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update image to support usage info #81

Merged
merged 5 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y qemu-user-static

- name: Clone llama-cpp-python
run: |
git config --global user.email "[email protected]"
git config --global user.name "Podman Desktop team"
cd chat
./setup.sh

- name: Build Playground Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y qemu-user-static

- name: Clone llama-cpp-python
run: |
git config --global user.email "[email protected]"
git config --global user.name "Podman Desktop team"
cd chat
./setup.sh

- name: Build Playground Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y qemu-user-static

- name: Clone llama-cpp-python
run: |
git config --global user.email "[email protected]"
git config --global user.name "Podman Desktop team"
cd chat
./setup.sh

- name: Build Playground Image
id: build-image
uses: redhat-actions/buildah-build@v2
Expand Down Expand Up @@ -130,4 +137,4 @@ jobs:
with:
tag: ${{ needs.tag.outputs.githubTag }}
name: ${{ needs.tag.outputs.githubTag }}


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
llama-cpp-python
1 change: 1 addition & 0 deletions chat/base/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN microdnf install -y python3 python3-pip gcc g++ shadow-utils && microdnf cle
RUN useradd -r -g root -m -d /home/default -s /bin/bash default
WORKDIR /home/default
COPY requirements.txt requirements.txt
COPY llama-cpp-python llama-cpp-python
RUN pip install --no-cache-dir --upgrade -r requirements.txt
USER default
COPY run.sh run.sh
Expand Down
1 change: 1 addition & 0 deletions chat/cuda/amd64/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN dnf install -y gcc-toolset-13-gcc gcc-toolset-13-gcc-c++
USER 1001
WORKDIR /locallm
COPY requirements.txt .
COPY --chown=1001 llama-cpp-python llama-cpp-python
COPY run.sh .
ENV CMAKE_ARGS="-DGGML_CUDA=on -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF -DLLAMA_F16C=OFF"
ENV FORCE_CMAKE=1
Expand Down
2 changes: 1 addition & 1 deletion chat/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
llama-cpp-python[server]==0.3.2
./llama-cpp-python[server]
pip==24.3.1
6 changes: 6 additions & 0 deletions chat/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
git clone https://github.com/abetlen/llama-cpp-python --no-checkout --recurse-submodules
cd llama-cpp-python
git checkout v0.3.2
git submodule update
git fetch origin pull/1552/head
git rebase ffc47e5a95cf31fe6d9d6d7953d5eb17fdcc8513
1 change: 1 addition & 0 deletions chat/vulkan/amd64/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN dnf install -y python3-dnf-plugin-versionlock && \

WORKDIR /locallm
COPY requirements.txt ./
COPY llama-cpp-python llama-cpp-python
RUN pip install --upgrade pip
ENV CMAKE_ARGS="-DGGML_VULKAN=on"
ENV FORCE_CMAKE=1
Expand Down
1 change: 1 addition & 0 deletions chat/vulkan/arm64/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
dnf install -y glslc && \
dnf clean all
COPY requirements.txt ./
COPY llama-cpp-python llama-cpp-python
RUN pip install --upgrade pip
ENV CMAKE_ARGS="-DGGML_VULKAN=on"
ENV FORCE_CMAKE=1
Expand Down