Files
llama.cpp/ci/README.md
T

69 lines
2.2 KiB
Markdown
Raw Normal View History

2023-07-18 14:24:43 +03:00
# CI
2025-02-15 16:40:57 +02:00
In addition to [Github Actions](https://github.com/ggml-org/llama.cpp/actions) `llama.cpp` uses a custom CI framework:
2023-07-18 14:24:43 +03:00
https://github.com/ggml-org/ci
It monitors the `master` branch for new commits and runs the
2025-02-15 16:40:57 +02:00
[ci/run.sh](https://github.com/ggml-org/llama.cpp/blob/master/ci/run.sh) script on dedicated cloud instances. This allows us
2023-07-18 14:24:43 +03:00
to execute heavier workloads compared to just using Github Actions. Also with time, the cloud instances will be scaled
to cover various hardware architectures, including GPU and Apple Silicon instances.
Collaborators can optionally trigger the CI run by adding the `ggml-ci` keyword to their commit message.
Only the branches of this repo are monitored for this keyword.
It is a good practice, before publishing changes to execute the full CI locally on your machine:
```bash
mkdir tmp
2023-07-22 11:48:22 +03:00
# CPU-only build
2023-07-18 14:24:43 +03:00
bash ./ci/run.sh ./tmp/results ./tmp/mnt
2023-07-22 11:48:22 +03:00
# with CUDA support
GG_BUILD_CUDA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
# with SYCL support
source /opt/intel/oneapi/setvars.sh
GG_BUILD_SYCL=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
2025-03-25 15:45:08 +08:00
# with MUSA support
GG_BUILD_MUSA=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
2023-07-18 14:24:43 +03:00
```
2025-03-25 15:45:08 +08:00
## Running MUSA CI in a Docker Container
Assuming `$PWD` is the root of the `llama.cpp` repository, follow these steps to set up and run MUSA CI in a Docker container:
### 1. Create a local directory to store cached models, configuration files and venv:
```bash
mkdir -p $HOME/llama.cpp/ci-cache
```
### 2. Create a local directory to store CI run results:
```bash
mkdir -p $HOME/llama.cpp/ci-results
```
### 3. Start a Docker container and run the CI:
```bash
docker run --privileged -it \
-v $HOME/llama.cpp/ci-cache:/ci-cache \
-v $HOME/llama.cpp/ci-results:/ci-results \
-v $PWD:/ws -w /ws \
2025-07-25 03:05:37 +08:00
mthreads/musa:rc4.2.0-devel-ubuntu22.04-amd64
2025-03-25 15:45:08 +08:00
```
Inside the container, execute the following commands:
```bash
apt update -y && apt install -y bc cmake ccache git python3.10-venv time unzip wget
2025-03-25 15:45:08 +08:00
git config --global --add safe.directory /ws
GG_BUILD_MUSA=1 bash ./ci/run.sh /ci-results /ci-cache
```
This setup ensures that the CI runs within an isolated Docker environment while maintaining cached files and results across runs.