1313# rpi - build and push Raspberry Pi image
1414#
1515
16+ # The location of the root of the server repo relative to this script
17+ repo_base=" ../../CodeProject.AI-Server-Private"
18+
1619# Sniff Parameters
1720
1821do_all=false
5760
5861# Get Version: We're building for the current server version
5962
60- # This script
61- SCRIPT_PATH=" $( cd -- " $( dirname " $0 " ) " > /dev/null 2>&1 ; pwd -P ) "
62-
63- MAJOR=$( grep -o ' "Major"\s*:\s*[^,}]*' " ${SCRIPT_PATH} /../../src/server/version.json" | sed ' s/.*: \(.*\)/\1/' )
64- MINOR=$( grep -o ' "Minor"\s*:\s*[^,}]*' " ${SCRIPT_PATH} /../../src/server/version.json" | sed ' s/.*: \(.*\)/\1/' )
65- PATCH=$( grep -o ' "Patch"\s*:\s*[^,}]*' " ${SCRIPT_PATH} /../../src/server/version.json" | sed ' s/.*: \(.*\)/\1/' )
63+ MAJOR=$( grep -o ' "Major"\s*:\s*[^,}]*' " ${repo_base} /src/server/version.json" | sed ' s/.*: \(.*\)/\1/' )
64+ MINOR=$( grep -o ' "Minor"\s*:\s*[^,}]*' " ${repo_base} /src/server/version.json" | sed ' s/.*: \(.*\)/\1/' )
65+ PATCH=$( grep -o ' "Patch"\s*:\s*[^,}]*' " ${repo_base} /src/server/version.json" | sed ' s/.*: \(.*\)/\1/' )
6666VERSION=" ${MAJOR} .${MINOR} .${PATCH} "
6767
6868# Let the user know
@@ -78,32 +78,32 @@ docker pull mcr.microsoft.com/dotnet/sdk:7.0
7878
7979if [ " $do_cpu " = true ]; then
8080 docker pull docker.io/amd64/ubuntu:22.04
81- docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --tag codeproject/ai-server -f Dockerfile ../..
81+ docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --tag codeproject/ai-server -f Dockerfile " ${repo_base} "
8282fi
8383
8484if [ " $do_gpu " = true ]; then
8585 # docker pull docker pull cupy/nvidia-cuda:10.2-runtime-ubuntu18.04
8686 docker pull nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04
8787 docker pull nvidia/cuda:12.2.0-runtime-ubuntu22.04
8888
89- # docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --build-arg CUDA_VERSION=10.2 --build-arg CUDA_MAJOR=10 --tag codeproject/ai-server:cuda10_2 -f Dockerfile-GPU-CUDA10_2 ../..
90- docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --build-arg CUDA_VERSION=11.7.1-cudnn8 --build-arg CUDA_MAJOR=11 --tag codeproject/ai-server:cuda11_7 -f Dockerfile-GPU-CUDA ../..
91- docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --build-arg CUDA_VERSION=12.2.0 --build-arg CUDA_MAJOR=12 --tag codeproject/ai-server:cuda12_2 -f Dockerfile-GPU-CUDA ../..
89+ # docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --build-arg CUDA_VERSION=10.2 --build-arg CUDA_MAJOR=10 --tag codeproject/ai-server:cuda10_2 -f Dockerfile-GPU-CUDA10_2 "${repo_base}"
90+ docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --build-arg CUDA_VERSION=11.7.1-cudnn8 --build-arg CUDA_MAJOR=11 --tag codeproject/ai-server:cuda11_7 -f Dockerfile-GPU-CUDA " ${repo_base} "
91+ docker buildx build --platform linux/amd64 --build-arg CPIA_VERSION=$VERSION --build-arg CUDA_VERSION=12.2.0 --build-arg CUDA_MAJOR=12 --tag codeproject/ai-server:cuda12_2 -f Dockerfile-GPU-CUDA " ${repo_base} "
9292fi
9393
9494if [ " $do_arm " = true ]; then
9595 docker pull arm64v8/ubuntu:22.04
96- docker buildx build --platform linux/arm64 --build-arg CPIA_VERSION=$VERSION --no-cache --tag codeproject/ai-server:arm64 -f Dockerfile-Arm64 ../..
96+ docker buildx build --platform linux/arm64 --build-arg CPIA_VERSION=$VERSION --no-cache --tag codeproject/ai-server:arm64 -f Dockerfile-Arm64 " ${repo_base} "
9797fi
9898
9999if [ " $do_jetson " = true ]; then
100100 docker pull gpuci/cuda-l4t:10.2-runtime-ubuntu18.04
101- docker buildx build --platform linux/arm64 --build-arg CPIA_VERSION=$VERSION --no-cache --tag codeproject/ai-server:jetson -f Dockerfile-Jetson ../..
101+ docker buildx build --platform linux/arm64 --build-arg CPIA_VERSION=$VERSION --no-cache --tag codeproject/ai-server:jetson -f Dockerfile-Jetson " ${repo_base} "
102102fi
103103
104104if [ " $do_rpi " = true ]; then
105105 docker pull arm64v8/ubuntu:22.04
106- docker buildx build --platform linux/arm64 --build-arg CPIA_VERSION=$VERSION --no-cache --tag codeproject/ai-server:rpi64 -f Dockerfile-RPi64 ../..
106+ docker buildx build --platform linux/arm64 --build-arg CPIA_VERSION=$VERSION --no-cache --tag codeproject/ai-server:rpi64 -f Dockerfile-RPi64 " ${repo_base} "
107107fi
108108
109109
0 commit comments