Skip to content

Commit ccc6bc0

Browse files
authored
fix(ci): docker build workflow (abetlen#2156)
* fix(ci): harden docker build workflow * docs: update changelog for ci workflows
1 parent 909ebf1 commit ccc6bc0

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/build-docker.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ jobs:
1616
with:
1717
submodules: "recursive"
1818

19+
- name: Set image tag
20+
run: |
21+
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
22+
image_tag="${GITHUB_REF_NAME}"
23+
else
24+
image_tag="${GITHUB_REF_NAME//\//-}"
25+
fi
26+
echo "IMAGE_TAG=$image_tag" >> "$GITHUB_ENV"
27+
1928
- name: Set up QEMU
2029
uses: docker/setup-qemu-action@v3
2130

@@ -40,7 +49,7 @@ jobs:
4049
platforms: linux/amd64,linux/arm64
4150
tags: |
4251
ghcr.io/abetlen/llama-cpp-python:latest
43-
ghcr.io/abetlen/llama-cpp-python:${{ github.ref_name }}
52+
ghcr.io/abetlen/llama-cpp-python:${{ env.IMAGE_TAG }}
4453
build-args: |
4554
BUILDKIT_INLINE_CACHE=1
4655

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- fix(ci): Build Docker images from the checked-out source and sanitize branch tags by @abetlen in #2156
11+
- fix(ci): Fix the CUDA wheel workflow and keep release tags aligned with the built toolkit by @abetlen in #2155
12+
- fix(ci): Speed up release wheel builds by moving arm64 off QEMU and parallelizing riscv64 by @abetlen in #2154
13+
1014
## [0.3.17]
1115

1216
- feat: Update llama.cpp to ggerganov/llama.cpp@49bfddeca18e62fa3d39114a23e9fcbdf8a22388 and sync Python bindings by @abetlen in #2151

docker/simple/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FROM ${IMAGE}
66

77
# Re-declare the ARG after FROM
88
ARG IMAGE
9+
ARG CMAKE_ARGS="-DGGML_NATIVE=off"
910

1011
# Update and upgrade the existing packages
1112
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
@@ -26,7 +27,7 @@ RUN python3 -m pip install --upgrade pip
2627

2728
RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings starlette-context
2829

29-
RUN pip install llama-cpp-python --verbose;
30+
RUN CMAKE_ARGS="${CMAKE_ARGS}" pip install . --verbose
3031

3132
# Set environment variable for the host
3233
ENV HOST=0.0.0.0

0 commit comments

Comments
 (0)