Changed to amd64 only build and also added docker-compose.yml

This commit is contained in:
Matt 2024-09-21 13:47:19 +01:00
parent 2d680d5527
commit 1ac12871e3
2 changed files with 22 additions and 2 deletions

20
docker-compose.yml Normal file
View file

@ -0,0 +1,20 @@
version: '3.8'
services:
ollama_gpu:
image: ollama/ollama:2d680d5-dirty-rocm
container_name: ollama_gpu_3
environment:
- HIP_PATH=/opt/rocm/lib/
- LD_LIBRARY_PATH=/opt/rocm/lib
devices:
- /dev/kfd
- /dev/dri
volumes:
- ollama:/root/.ollama
ports:
- "11434:11434"
restart: unless-stopped
volumes:
ollama:

View file

@ -3,7 +3,7 @@
export VERSION=${VERSION:-$(git describe --tags --first-parent --abbrev=7 --long --dirty --always | sed -e "s/^v//g")} export VERSION=${VERSION:-$(git describe --tags --first-parent --abbrev=7 --long --dirty --always | sed -e "s/^v//g")}
export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\" \"-X=github.com/ollama/ollama/server.mode=release\"'" export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\" \"-X=github.com/ollama/ollama/server.mode=release\"'"
# TODO - consider `docker buildx ls --format=json` to autodiscover platform capability # TODO - consider `docker buildx ls --format=json` to autodiscover platform capability
PLATFORM=${PLATFORM:-"linux/arm64,linux/amd64"} PLATFORM=${PLATFORM:-"linux/amd64"}
DOCKER_ORG=${DOCKER_ORG:-"ollama"} DOCKER_ORG=${DOCKER_ORG:-"ollama"}
RELEASE_IMAGE_REPO=${RELEASE_IMAGE_REPO:-"${DOCKER_ORG}/release"} RELEASE_IMAGE_REPO=${RELEASE_IMAGE_REPO:-"${DOCKER_ORG}/release"}
FINAL_IMAGE_REPO=${FINAL_IMAGE_REPO:-"${DOCKER_ORG}/ollama"} FINAL_IMAGE_REPO=${FINAL_IMAGE_REPO:-"${DOCKER_ORG}/ollama"}