feat: add REPO/BRANCH build args for llama.cpp (#59)
- Introduce ARG REPO and ARG BRANCH to replace the hardcoded git clone with: `git clone -b ${BRANCH} --single-branch --recursive ${REPO}` . This allows overriding the llama.cpp repository and branch at build time via `--build-arg`.
- Update `docs/building.md` to recommend using `--build-arg` instead of updating the file
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user