From 138cd97ce7f599cab64331f0d1a743b38b32f587 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 23 Dec 2024 15:37:57 +0100 Subject: [PATCH] chore(ci): try to add CirrusCI to build arm64 images natively Signed-off-by: Ettore Di Giacinto --- .cirrus.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 00000000..595bd386 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,24 @@ +## This builds the docker image for L4T with the arm64 architecture +docker_builder: + only_if: $CIRRUS_TAG != '' || $CIRRUS_BRANCH != '' + env: + CIRRUS_ARCH: arm64 + IMAGE_NAME: localai/localai + DOCKER_USERNAME: ENCRYPTED[!944ba150d3a7a27f3a9b7d3cc0f481989907ddeea9391a345ec751b70de1620f064cce952491a2fe2b434b1b9e0270b2!] + DOCKER_PASSWORD: ENCRYPTED[!2c9b4746de765859c11df043adafe1247876c7d535edc439eac66d8c1e88029b96e67a8023c36dfec30ee78ca5109089!] + build_script: | + BUILD_ARGS="--build-arg SKIP_DRIVERS=true --build-arg BUILD_TYPE=cublas --build-arg BASE_IMAGE=nvcr.io/nvidia/l4t-jetpack:r36.4.0 --build-arg IMAGE_TYPE=core" + if [ -n "$CIRRUS_TAG" ]; then + docker build $BUILD_ARGS --tag $IMAGE_NAME:$CIRRUS_TAG-nvidia-l4t-arm64-core . + docker tag $IMAGE_NAME:$CIRRUS_TAG-nvidia-l4t-arm64-core $IMAGE_NAME:latest-nvidia-l4t-arm64-core + else + docker build $BUILD_ARGS --tag $IMAGE_NAME:$CIRRUS_BRANCH-nvidia-l4t-arm64-core . + fi + login_script: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin + push_script: | + if [ -n "$CIRRUS_TAG" ]; then + docker push $IMAGE_NAME:$CIRRUS_TAG-nvidia-l4t-arm64-core + docker push $IMAGE_NAME:latest-nvidia-l4t-arm64-core + else + docker push $IMAGE_NAME:$CIRRUS_BRANCH-nvidia-l4t-arm64-core + fi \ No newline at end of file