From a294c5a2d37f4adeef2275926b163f3760c16dc2 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Wed, 7 Feb 2024 22:40:43 -0500 Subject: [PATCH] modularize docker-compose spec --- .gitignore | 2 +- docker-compose.amd.yml | 32 +++++++++++++++++++ docker-compose.yml => docker-compose.base.yml | 28 ---------------- 3 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 docker-compose.amd.yml rename docker-compose.yml => docker-compose.base.yml (66%) diff --git a/.gitignore b/.gitignore index 7d7a3a1..412c257 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -.env.override +docker-compose.yml \ No newline at end of file diff --git a/docker-compose.amd.yml b/docker-compose.amd.yml new file mode 100644 index 0000000..f95d410 --- /dev/null +++ b/docker-compose.amd.yml @@ -0,0 +1,32 @@ +include: + - docker-compose.base.yml + +services: + # Begin Ollama service + ollama: + image: ollama/ollama:0.1.22-rocm + restart: unless-stopped + entrypoint: /bootstrap.sh + command: mistral + env_file: + - .env + ports: + - 11434:11434 + # begin for AMD GPU support + devices: + - /dev/kfd + - /dev/dri + group_add: + - video + ipc: host + cap_add: + - SYS_PTRACE + security_opt: + - seccomp=unconfined + # end of section for AMD GPU support + volumes: + - ./ollama/bootstrap.sh:/bootstrap.sh:ro + - ollama:/root/.ollama + +volumes: + ollama: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.base.yml similarity index 66% rename from docker-compose.yml rename to docker-compose.base.yml index 5ba292f..0e012cc 100644 --- a/docker-compose.yml +++ b/docker-compose.base.yml @@ -1,31 +1,4 @@ -version: "3" services: - # Begin Ollama service - ollama: - image: ollama/ollama:0.1.22-rocm - restart: unless-stopped - entrypoint: /bootstrap.sh - command: mistral - env_file: - - .env - ports: - - 11434:11434 - # begin for AMD GPU support - devices: - - /dev/kfd - - /dev/dri - group_add: - - video - ipc: host - cap_add: - - SYS_PTRACE - security_opt: - - seccomp=unconfined - # end of section for AMD GPU support - volumes: - - ./ollama/bootstrap.sh:/bootstrap.sh:ro - - ollama:/root/.ollama - # Begin LiteLLM service litellm: image: ghcr.io/berriai/litellm:main-latest @@ -71,7 +44,6 @@ services: - librechat_meilisearch_data:/meili_data volumes: - ollama: librechat_images: librechat_mongodb_data: librechat_meilisearch_data: \ No newline at end of file