mirror of
https://github.com/ollama/ollama.git
synced 2025-03-26 17:51:48 +01:00
* Bump cuda and rocm versions Update ROCm to linux:6.3 win:6.2 and CUDA v12 to 12.8. Yum has some silent failure modes, so largely switch to dnf. * Fix windows build script
35 lines
812 B
Bash
Executable File
35 lines
812 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
. $(dirname $0)/env.sh
|
|
|
|
# Set PUSH to a non-empty string to trigger push instead of load
|
|
PUSH=${PUSH:-""}
|
|
|
|
if [ -z "${PUSH}" ] ; then
|
|
echo "Building ${FINAL_IMAGE_REPO}:$VERSION locally. set PUSH=1 to push"
|
|
LOAD_OR_PUSH="--load"
|
|
else
|
|
echo "Will be pushing ${FINAL_IMAGE_REPO}:$VERSION"
|
|
LOAD_OR_PUSH="--push"
|
|
fi
|
|
|
|
docker buildx build \
|
|
${LOAD_OR_PUSH} \
|
|
--platform=${PLATFORM} \
|
|
${OLLAMA_COMMON_BUILD_ARGS} \
|
|
-f Dockerfile \
|
|
-t ${FINAL_IMAGE_REPO}:$VERSION \
|
|
.
|
|
|
|
if echo $PLATFORM | grep "amd64" > /dev/null; then
|
|
docker buildx build \
|
|
${LOAD_OR_PUSH} \
|
|
--platform=linux/amd64 \
|
|
${OLLAMA_COMMON_BUILD_ARGS} \
|
|
--build-arg FLAVOR=rocm \
|
|
-f Dockerfile \
|
|
-t ${FINAL_IMAGE_REPO}:$VERSION-rocm \
|
|
.
|
|
fi |