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

Feature: Lightweight llama_cpp.server Docker Image Build Workflow #1331

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

devcxl
Copy link

@devcxl devcxl commented Apr 5, 2024

By adding this workflow, the Docker image it builds becomes more lightweight.
image
You can see that the built image is one-tenth the size of the original image.

@devcxl
Copy link
Author

devcxl commented Apr 5, 2024

docker run --network host --rm -it -v ./llama-server/:/data/ ghcr.io/devcxl/llama-cpp-python:light-server --host 0.0.0.0 --model /data/models/Qwen1.5/qwen1_5-0_5b-chat-q2_k.gguf
By using this command, you can run it directly

--add-binary "/home/runner/work/llama-cpp-python/llama-cpp-python/llama_cpp/libllava.so:./llama_cpp/"

- name: upload artifact
uses: actions/upload-artifact@v3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade to v4

submodules: "recursive"

- name: Set up Python 3.9
uses: actions/setup-python@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade to v5

@devcxl
Copy link
Author

devcxl commented May 7, 2024

@Smartappli Okay, I will make these changes later today

@Smartappli
Copy link
Contributor

Smartappli commented May 23, 2024

@abetlen  Can you approve testing plz?

with:
submodules: "recursive"

- name: Set up Python 3.9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can upgrade to 3.12


- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use uv and change L30 & L31 with:

python -m pip install uv
python -m uv pip install .[all] -v
python -m uv pip install pyinstaller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants