LLM inference in C/C++
C++ ggml
musa: build the docker image and CI container from the MUSA SDK images (#29624)
R0CKSTAR18b74ff68ee7
diff --git a/.devops/musa.Dockerfile b/.devops/musa.Dockerfileindex 33ac6bb82d..0e3f633597 100644--- a/.devops/musa.Dockerfile+++ b/.devops/musa.Dockerfile@@ -1,9 +1,9 @@ARG UBUNTU_VERSION=22.04# This needs to generally match the container host's environment.# Target the MUSA build image-ARG BASE_MUSA_DEV_CONTAINER=registry.mthreads.com/mcconline/inference/pytorch:2.9.1.post1-py3.10-musa5.2.0-mp31-devel-ubuntu${UBUNTU_VERSION}-amd64+ARG BASE_MUSA_DEV_CONTAINER=registry.mthreads.com/mcconline/musa_sdk:5.2.0-devel-ubuntu${UBUNTU_VERSION}-s5000-ARG BASE_MUSA_RUN_CONTAINER=${BASE_MUSA_DEV_CONTAINER}+ARG BASE_MUSA_RUN_CONTAINER=registry.mthreads.com/mcconline/musa_sdk:5.2.0-runtime-ubuntu${UBUNTU_VERSION}-s5000ARG BUILD_DATE=N/AARG APP_VERSION=N/A@@ -36,7 +36,10 @@ RUN apt-get update && \python3-pip \git \libssl-dev \- libgomp1+ libgomp1 \+ musa-mualg-5-2 \+ musa-muthrust-5-2 \+ libmthreads-computeWORKDIR /app@@ -79,13 +82,16 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \org.opencontainers.image.source=$IMAGE_SOURCERUN apt-get update \- && apt-get install -y libgomp1 curl ffmpeg \+ && apt-get install -y libgomp1 curl ffmpeg libmthreads-compute \&& apt autoremove -y \&& apt clean -y \&& rm -rf /tmp/* /var/tmp/* \&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \&& find /var/cache -type f -delete+# The MUSA runtime image does not register its library directory+RUN echo "/usr/local/musa/lib" > /etc/ld.so.conf.d/musa-runtime.conf && ldconfig+COPY --from=build /app/lib/ /app### Fulldiff --git a/.github/workflows/build-cuda-ubuntu.yml b/.github/workflows/build-cuda-ubuntu.ymlindex 3dc9255be3..68b6c01900 100644--- a/.github/workflows/build-cuda-ubuntu.yml+++ b/.github/workflows/build-cuda-ubuntu.yml@@ -145,7 +145,7 @@ jobs:musa:runs-on: ubuntu-22.04- container: registry.mthreads.com/mcconline/inference/pytorch:2.9.1.post1-py3.10-musa5.2.0-mp31-devel-ubuntu22.04-amd64+ container: registry.mthreads.com/mcconline/musa_sdk:5.2.0-devel-ubuntu22.04-s5000steps:- name: Clone@@ -156,7 +156,7 @@ jobs:id: dependsrun: |apt-get update- apt-get install -y build-essential git cmake libssl-dev jq python3-venv+ apt-get install -y build-essential git cmake libssl-dev jq python3-venv musa-mualg-5-2 musa-muthrust-5-2 libmthreads-compute- name: ccacheuses: ggml-org/[email protected]diff --git a/ci/README-MUSA.md b/ci/README-MUSA.mdindex 2101dfa2c0..40e9ea5af5 100644--- a/ci/README-MUSA.md+++ b/ci/README-MUSA.md@@ -21,13 +21,13 @@ 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 \- registry.mthreads.com/mcconline/inference/pytorch:2.9.1.post1-py3.10-musa5.2.0-mp31-devel-ubuntu22.04-amd64+ registry.mthreads.com/mcconline/musa_sdk:5.2.0-devel-ubuntu22.04-s5000```Inside the container, execute the following commands:```bash-apt update -y && apt install -y bc cmake ccache git python3.10-venv time unzip wget+apt update -y && apt install -y bc cmake ccache git python3.10-venv time unzip wget musa-mualg-5-2 musa-muthrust-5-2 libmthreads-computegit config --global --add safe.directory /wsGG_BUILD_MUSA=1 bash ./ci/run.sh /ci-results /ci-cache```