Molly · 2025年11月11日 · 上海

【“星睿O6”AI PC评测】 编译25Q3 SDK、运行CLIP、尝试适配immich

原因

用radxa的debian镜像,下载了https://www.modelscope.cn/mod...
尝试运行NPU demo报错:
2018561f361f8858896b0318f8dba447.png
需要使用新版本npu kmd/umd运行

编译25Q3 Cix SDK

主要参考https://docs.radxa.com/en/ori...
首先准备一个debian11的虚拟机(文档里说When the SDK runs in a container, permission issues may occur. It is recommended to use a physical machine or a virtual machine for compilation.;我最开始使用了一个ubuntu 22.04的lxc容器,最后确实遇到权限问题了)
安装repo:

sudo apt-get update
sudo apt-get install repo

获取源码(挂梯子):

mkdir cix-sdk
cd cix-sdk
repo init https://gitlab.com/cix-linux/linux_repo/cix-manifest.git -b cix_p1_K6.6_2025Q3_dev

这里注意指定cix_p1_K6.6_2025Q3_dev分支

接着继续按照文档:

sudo apt-get update
. ./build-scripts/envtool.sh
newer_env
sudo apt-get install python-is-python3 p7zip meson apt-utils
i=$((1))
get_cix_ext() {
    local block="$(printf "%03d" $1)"
    echo "https://github.com/radxa-pkg/cix-prebuilt/releases/download/$EX_CUSTOMER-$EX_PROJECT-$EX_VERSION/cix-sdk-ext.7z.$block"
}
while wget "$(get_cix_ext "$i")"; do
    i=$((i + 1))
done
7zr x cix-sdk-ext.7z.001

编译之前修改一点配置(因为发现默认情况下编译出来的镜像用不了docker:内核NF_TABLES相关配置全都没开)
注意到cix-sdk里面build-kernel.sh会读取DOCKER_MODE配置:
截屏2025-11-11 10.02.03.png
DOCKER_MODE="docker"则在config里加上cix_redroid.config
截屏2025-11-11 10.03.05.png
cix_redroid.config看起来除了redroid相关配置之外,也开启了nftables相关的configs
但我各种尝试给编译脚本传DOCKER_MODE="docker"选项都不成功,最后在build-all.sh里将-K "$DOCKER_MODE"替换为-K "docker"写死完事

再修改一下build-scripts/grub.cfg,调整默认启动项为orion o6那一项(set default=31:)
截屏2025-11-11 10.06.00.png
截屏2025-11-11 10.06.20.png

再把debian12/os/source_deb/cix-debian-misc/usr/bin/cix_docker_env.sh里面的内容注释掉(它会在我烧录完镜像启动之后,直接把nvme的剩余空间建立为一个分区用来做docker的存储位置,但此时我的rootfs还没有extend,导致我只有20几G的rootfs大小,很烦人)
最后

build all

得到

output/cix_evb/images/linux-fs.sdcard: System image.
output/cix_evb/images/cix_debian.iso: The modified Debian installation ISO.
output/cix_evb/images/cix_flash_all_O6.bin: BIOS image.

烧录并启动

output/cix_evb/images/linux-fs.sdcard 用dd或etcher写入nvme,插上o6
BIOS需要使用https://github.com/radxa-pkg/... radxa最近刚release的新bios(否则ACPI启动内核会炸)
给o6上电,正常启动
截屏2025-11-11 10.15.34.png

运行ai_model_hub_25_Q3中的CLIP demo

预先下载好https://www.modelscope.cn/mod...

sudo apt install python3-venv libpython3-dev
python3 -m venv --system-site-packages .venv
source .venv/bin/activate
cd ai_model_hub_25_Q3/
pip install -r requirements.txt

安装完依赖后:

cd ./models/Generative_AI/Image_to_Text/onnx_clip
python inference_npu.py

e0f9da4f43b0fa340627e00433d4a203.png
可以正常运行了

试图适配immich

immich是一个开源云端相册服务,其中的immich-matchine-learning服务支持使用ViT模型对照片进行识别和标注实现文字搜图功能
cix官方demo里用的是ViT-B-32模型
尝试糊了一个immich fork:https://github.com/MollySophi... (注:未测试!!)
但是在准备调试的时候遇到了些问题:
docker正常安装

curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker $USER 

接着在immich文件夹下make dev:

cix@cix-localhost:~/immich$ make dev
[+] Running 3/3
 ! immich-web Warning              pull access denied for immich-web-dev, repository does not exist or may require 'docker login'                                        1.9s 
 ! immich-machine-learning Warning pull access denied for immich-machine-learning-dev, repository does not exist or may require 'doc...                                  1.8s 
 ! immich-server Warning           pull access denied for immich-server-dev, repository does not exist or may require 'docker login'                                     2.0s 
[+] Building 3.1s (32/36)                                                                                                                                                     
 => [internal] load local bake definitions                                                                                                                               0.0s
 => => reading from stdin 1.56kB                                                                                                                                         0.0s
 => [immich-machine-learning internal] load build definition from Dockerfile                                                                                             0.0s
 => => transferring dockerfile: 7.80kB                                                                                                                                   0.0s
 => [immich-web internal] load build definition from Dockerfile.dev                                                                                                      0.0s
 => => transferring dockerfile: 3.02kB                                                                                                                                   0.0s
 => [immich-machine-learning internal] load metadata for docker.io/library/python:3.11-bookworm@sha256:fc1f2e357c307c4044133952b203e66a47e7726821a664f603a180a0c5823844  1.9s
 => [immich-machine-learning internal] load metadata for ghcr.io/astral-sh/uv:0.8.15@sha256:a5727064a0de127bdb7c9d3c1383f3a9ac307d9f2d8a391edc7896c54289ced0             1.3s
 => [immich-machine-learning internal] load metadata for docker.io/library/python:3.11-slim-bookworm@sha256:873f91540d53b36327ed4fb018c9669107a4e2a676719720edb4209c4b1  1.9s
 => [immich-server internal] load metadata for ghcr.io/immich-app/base-server-dev:202511041104@sha256:7558931a4a71989e7fd9fa3e1ba6c28da15891867310edda8c58236171839f2f   1.3s
 => [immich-server internal] load .dockerignore                                                                                                                          0.0s
 => => transferring context: 521B                                                                                                                                        0.0s
 => [immich-web dev 1/9] FROM ghcr.io/immich-app/base-server-dev:202511041104@sha256:7558931a4a71989e7fd9fa3e1ba6c28da15891867310edda8c58236171839f2f                    0.0s
 => => resolve ghcr.io/immich-app/base-server-dev:202511041104@sha256:7558931a4a71989e7fd9fa3e1ba6c28da15891867310edda8c58236171839f2f                                   0.0s
 => [immich-web internal] load build context                                                                                                                             0.0s
 => => transferring context: 392B                                                                                                                                        0.0s
 => CACHED [immich-server dev 2/9] RUN npm install --global corepack@latest &&   corepack enable pnpm &&   echo "store-dir=/buildcache/pnpm-store" >> /usr/local/etc/np  0.0s
 => CACHED [immich-server dev 3/9] COPY ./package* ./pnpm* .pnpmfile.cjs /tmp/create-dep-cache/                                                                          0.0s
 => CACHED [immich-server dev 4/9] COPY ./web/package* ./web/pnpm* /tmp/create-dep-cache/web/                                                                            0.0s
 => CACHED [immich-server dev 5/9] COPY ./server/package* ./server/pnpm* /tmp/create-dep-cache/server/                                                                   0.0s
 => CACHED [immich-server dev 6/9] COPY ./open-api/typescript-sdk/package* ./open-api/typescript-sdk/pnpm* /tmp/create-dep-cache/open-api/typescript-sdk/                0.0s
 => CACHED [immich-server dev 7/9] WORKDIR /tmp/create-dep-cache                                                                                                         0.0s
 => CACHED [immich-server dev 8/9] RUN pnpm fetch && rm -rf /tmp/create-dep-cache && chmod -R o+rw /buildcache                                                           0.0s
 => CACHED [immich-web dev 9/9] WORKDIR /usr/src/app                                                                                                                     0.0s
 => ERROR [immich-web] exporting to image                                                                                                                                0.3s
 => => exporting layers                                                                                                                                                  0.3s
 => ERROR [immich-server] exporting to image                                                                                                                             0.3s
 => => exporting layers                                                                                                                                                  0.3s
 => [immich-machine-learning internal] load .dockerignore                                                                                                                0.1s
 => => transferring context: 58B                                                                                                                                         0.0s
 => [immich-machine-learning builder-cpu 1/1] FROM docker.io/library/python:3.11-bookworm@sha256:fc1f2e357c307c4044133952b203e66a47e7726821a664f603a180a0c5823844        0.1s
 => => resolve docker.io/library/python:3.11-bookworm@sha256:fc1f2e357c307c4044133952b203e66a47e7726821a664f603a180a0c5823844                                            0.1s
 => [immich-machine-learning] FROM ghcr.io/astral-sh/uv:0.8.15@sha256:a5727064a0de127bdb7c9d3c1383f3a9ac307d9f2d8a391edc7896c54289ced0                                   0.1s
 => => resolve ghcr.io/astral-sh/uv:0.8.15@sha256:a5727064a0de127bdb7c9d3c1383f3a9ac307d9f2d8a391edc7896c54289ced0                                                       0.1s
 => [immich-machine-learning internal] load build context                                                                                                                0.1s
 => => transferring context: 4.17kB                                                                                                                                      0.0s
 => [immich-machine-learning prod-cpu 1/1] FROM docker.io/library/python:3.11-slim-bookworm@sha256:873f91540d53b36327ed4fb018c9669107a4e2a676719720edb4209c4b15d029      0.1s
 => => resolve docker.io/library/python:3.11-slim-bookworm@sha256:873f91540d53b36327ed4fb018c9669107a4e2a676719720edb4209c4b15d029                                       0.1s
 => CACHED [immich-machine-learning prod 1/7] RUN apt-get update &&     apt-get install -y --no-install-recommends tini ccache libgl1 libglib2.0-0 libgomp1 $(if ! [ "c  0.0s
 => CACHED [immich-machine-learning prod 2/7] RUN ln -s "/usr/lib/$(arch)-linux-gnu/libmimalloc.so.2" /usr/lib/libmimalloc.so.2                                          0.0s
 => CACHED [immich-machine-learning prod 3/7] WORKDIR /usr/src                                                                                                           0.0s
 => CACHED [immich-machine-learning prod 4/7] RUN echo "hard core 0" >> /etc/security/limits.conf &&     echo "fs.suid_dumpable 0" >> /etc/sysctl.conf &&     echo 'uli  0.0s
 => CACHED [immich-machine-learning builder 1/4] RUN apt-get update && apt-get install -y --no-install-recommends g++                                                    0.0s
 => CACHED [immich-machine-learning builder 2/4] COPY --from=ghcr.io/astral-sh/uv:0.8.15@sha256:a5727064a0de127bdb7c9d3c1383f3a9ac307d9f2d8a391edc7896c54289ced0 /uv /u  0.0s
 => CANCELED [immich-machine-learning builder 3/4] RUN --mount=type=cache,target=/root/.cache/uv     --mount=type=bind,source=uv.lock,target=uv.lock     --mount=type=b  0.5s
------
 > [immich-web] exporting to image:
------
------
 > [immich-server] exporting to image:
------
target immich-server: failed to solve: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount1037434678: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount768422195: failed to write compressed diff: failed to create diff tar stream: failed to get xattr for /var/lib/containerd/tmpmounts/containerd-mount1037434678/bin: operation not supported

make[1]: Entering directory '/home/cix/immich'
docker compose -f ./docker/docker-compose.dev.yml down --remove-orphans
make[1]: Leaving directory '/home/cix/immich'
make: *** [Makefile:2: dev] Error 1

最近实在太忙,后续有时间再看看这里docker export image报错该如何解决吧😭

推荐阅读
关注数
1
文章数
3
目录
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息