diff --git a/docs/building.md b/docs/building.md index 8d9141b..4125dcd 100644 --- a/docs/building.md +++ b/docs/building.md @@ -40,7 +40,7 @@ podman build --no-cache -t llama-rocm-6.4.2 -f Dockerfile.rocm-6.4.2 . ## 3. Customizing the Build -* **llama.cpp version**: Change the `git clone` or `git checkout` line in the Dockerfile. +* **llama.cpp version**: Use the `--build-arg REPO=...` and `--build-arg BRANCH=...` options to specify a different repository or branch. * **Extra dependencies**: Add them to the Dockerfile as needed. * **Other customizations**: Install tools, patch scripts, or swap to a different base image. diff --git a/toolboxes/Dockerfile.rocm-6.4.4 b/toolboxes/Dockerfile.rocm-6.4.4 index 4ea7625..bdcca45 100644 --- a/toolboxes/Dockerfile.rocm-6.4.4 +++ b/toolboxes/Dockerfile.rocm-6.4.4 @@ -11,7 +11,9 @@ RUN dnf -y --nodocs --setopt=install_weak_deps=False \ # llama.cpp WORKDIR /opt/llama.cpp -RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . +ARG REPO=https://github.com/ggerganov/llama.cpp.git +ARG BRANCH=master +RUN git clone -b ${BRANCH} --single-branch --recursive ${REPO} . \ # build + install RUN git clean -xdf \ diff --git a/toolboxes/Dockerfile.rocm-7.2 b/toolboxes/Dockerfile.rocm-7.2 index 0e77218..d8a4b1a 100644 --- a/toolboxes/Dockerfile.rocm-7.2 +++ b/toolboxes/Dockerfile.rocm-7.2 @@ -34,7 +34,9 @@ ENV ROCM_PATH=/opt/rocm \ # llama.cpp WORKDIR /opt/llama.cpp -RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . +ARG REPO=https://github.com/ggerganov/llama.cpp.git +ARG BRANCH=master +RUN git clone -b ${BRANCH} --single-branch --recursive ${REPO} . \ # build RUN git clean -xdf \ diff --git a/toolboxes/Dockerfile.rocm7-nightlies b/toolboxes/Dockerfile.rocm7-nightlies index 1e1e598..66ead49 100644 --- a/toolboxes/Dockerfile.rocm7-nightlies +++ b/toolboxes/Dockerfile.rocm7-nightlies @@ -53,7 +53,9 @@ RUN printf '%s\n' \ && echo 'source /etc/profile.d/rocm.sh' >> /etc/bashrc WORKDIR /opt/llama.cpp -RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . \ +ARG REPO=https://github.com/ggerganov/llama.cpp.git +ARG BRANCH=master +RUN git clone -b ${BRANCH} --single-branch --recursive ${REPO} . \ && git clean -xdf \ && git submodule update --recursive diff --git a/toolboxes/Dockerfile.vulkan-amdvlk b/toolboxes/Dockerfile.vulkan-amdvlk index e190d6b..ad08071 100644 --- a/toolboxes/Dockerfile.vulkan-amdvlk +++ b/toolboxes/Dockerfile.vulkan-amdvlk @@ -17,7 +17,9 @@ RUN curl -L -o /tmp/amdvlk-2025.Q2.1.x86_64.rpm \ # llama.cpp WORKDIR /opt/llama.cpp -RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . +ARG REPO=https://github.com/ggerganov/llama.cpp.git +ARG BRANCH=master +RUN git clone -b ${BRANCH} --single-branch --recursive ${REPO} . \ # build RUN git clean -xdf \ diff --git a/toolboxes/Dockerfile.vulkan-radv b/toolboxes/Dockerfile.vulkan-radv index 71df22b..d482eac 100644 --- a/toolboxes/Dockerfile.vulkan-radv +++ b/toolboxes/Dockerfile.vulkan-radv @@ -11,7 +11,9 @@ RUN dnf -y --nodocs --setopt=install_weak_deps=False install \ # llama.cpp WORKDIR /opt/llama.cpp -RUN git clone --recursive https://github.com/ggerganov/llama.cpp.git . +ARG REPO=https://github.com/ggerganov/llama.cpp.git +ARG BRANCH=master +RUN git clone -b ${BRANCH} --single-branch --recursive ${REPO} . \ # build RUN git clean -xdf \