From b76e3849606fb842f69dcde9f3f374ae96e365ed Mon Sep 17 00:00:00 2001 From: Felix Schulze Date: Wed, 29 Jan 2025 22:49:22 +0100 Subject: [PATCH] working ollama with HF chat ui --- .gitignore | 4 ++++ Makefile | 9 +++++++++ docker-compose.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ee3dc23 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ + +ollama/ + +.env.local diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..845fd4e --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ + +start: + @docker compose up -d + +stop: + @docker compose down + +install: + @docker exec -it deep_seek_r1-ollama-service-1 ollama pull deepseek-r1:14b diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c51d7de --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,40 @@ + +services: + mongodb: + image: mongo:4.4.6 + ports: + - 27017:27017 + networks: + - chat-ui + + ollama-service: + image: ollama/ollama:rocm + ports: + - 11434:11434 + volumes: + - ./ollama:/root/.ollama + devices: + - /dev/kfd # Grant access to /dev/kfd device + - /dev/dri # Grant access to /dev/dri device + + networks: + - chat-ui + + chat-ui: + image: ghcr.io/huggingface/chat-ui-db:latest + volumes: + - ./db:/data + - .env.local:/app/.env.local + ports: + - 3000:3000 + environment: + - MONGODB_URL=mongodb://mongodb:27017 + depends_on: + - mongodb + networks: + - chat-ui + + +networks: + chat-ui: + driver: bridge