sugarforever / chat-ollama

ChatOllama is an open source chatbot based on LLMs. It supports a wide range of language models, and knowledge base management.
MIT License
2.61k stars 410 forks source link

新版本在docker里无法正常运行 #225

Open jchgjchg opened 6 months ago

jchgjchg commented 6 months ago

chatollama-1 exited with code 139 chatollama-1 | Listening on http://[::]:3000

caihengsheng commented 6 months ago

应可以运行,请删除docker中chatollama原镜像,下载docker-compose.yaml 重启动。

jchgjchg commented 6 months ago

请教如何彻底删除docker 里的原镜像? 每次问删了重新安装,都是chatollama-1

doggy8088 commented 6 months ago

首先 docker-compose_gpu.yaml 有個小 Bug 無法啟動,我有發一個 PR 在此 https://github.com/sugarforever/chat-ollama/pull/239

我的環境是 Windows 10 + Docker Desktop + WSL 2 Backend

我修正後有成功跑起來,是這樣啟動的

docker-compose -f .\docker-compose_gpu.yaml up

但是我無法按下 Send button

image

F12 Console 也有錯誤訊息

image

我嘗試 Create New Instruction 也無效果,完全無反應

image

以下是 Docker Logs

[+] Running 1/1
 ✔ chatollama Pulled                                                                                                               2.1s
[+] Running 5/5
 ✔ Network chat-ollama_default         Created                                                                                     0.1s
 ✔ Volume "chat-ollama_ollama_data"    Created                                                                                     0.0s
 ✔ Container chat-ollama-ollama-1      Created                                                                                     0.1s
 ✔ Container chat-ollama-chatollama-1  Created                                                                                     0.1s
 ✔ Container chat-ollama-chromadb-1    Created                                                                                     0.1s
Attaching to chatollama-1, chromadb-1, ollama-1
chromadb-1    | Starting 'uvicorn chromadb.app:app' with args: --workers 1 --host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30
chatollama-1  | Listening on http://[::]:3000
ollama-1      | Couldn't find '/root/.ollama/id_ed25519'. Generating new private key.
ollama-1      | Your new public key is:
ollama-1      |
ollama-1      | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOZ4rUI1QEileij/oUwl6ei1904kqeTlkqNDezTt8+mF
ollama-1      |
ollama-1      | time=2024-04-09T11:32:53.128Z level=INFO source=images.go:804 msg="total blobs: 0"
ollama-1      | time=2024-04-09T11:32:53.129Z level=INFO source=images.go:811 msg="total unused blobs removed: 0"
ollama-1      | time=2024-04-09T11:32:53.129Z level=INFO source=routes.go:1118 msg="Listening on [::]:11434 (version 0.1.31)"
ollama-1      | time=2024-04-09T11:32:53.130Z level=INFO source=payload_common.go:113 msg="Extracting dynamic libraries to /tmp/ollama3952448579/runners ..."
chromadb-1    | DEBUG:    [09-04-2024 11:32:54] Registering provider: token_config
chromadb-1    | DEBUG:    [09-04-2024 11:32:54] Registering provider: user_token_config
chromadb-1    | DEBUG:    [09-04-2024 11:32:54] Registering provider: token
chromadb-1    | DEBUG:    [09-04-2024 11:32:54] Registering provider: token
chromadb-1    | WARNING:  [09-04-2024 11:32:55] chroma_server_nofile is set to 65535, but this is less than current soft limit of 1048576. chroma_server_nofile will not be set.
chromadb-1    | INFO:     [09-04-2024 11:32:55] Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component System
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component OpenTelemetryClient
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component SimpleAssignmentPolicy
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component SqliteDB
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component QuotaEnforcer
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component Posthog
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component LocalSegmentManager
chromadb-1    | DEBUG:    [09-04-2024 11:32:55] Starting component SegmentAPI
chromadb-1    | INFO:     [09-04-2024 11:32:55] Started server process [1]
chromadb-1    | INFO:     [09-04-2024 11:32:55] Waiting for application startup.
chromadb-1    | INFO:     [09-04-2024 11:32:55] Application startup complete.
chromadb-1    | INFO:     [09-04-2024 11:32:55] Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
ollama-1      | time=2024-04-09T11:32:56.765Z level=INFO source=payload_common.go:140 msg="Dynamic LLM libraries [cpu rocm_v60000 cpu_avx cpu_avx2 cuda_v11]"
ollama-1      | time=2024-04-09T11:32:56.765Z level=INFO source=gpu.go:115 msg="Detecting GPU type"
ollama-1      | time=2024-04-09T11:32:56.765Z level=INFO source=gpu.go:265 msg="Searching for GPU management library libcudart.so*"
ollama-1      | time=2024-04-09T11:32:56.765Z level=INFO source=gpu.go:311 msg="Discovered GPU libraries: [/tmp/ollama3952448579/runners/cuda_v11/libcudart.so.11.0]"
ollama-1      | time=2024-04-09T11:32:56.934Z level=INFO source=gpu.go:120 msg="Nvidia GPU detected via cudart"
ollama-1      | time=2024-04-09T11:32:56.934Z level=INFO source=cpu_common.go:11 msg="CPU has AVX2"
ollama-1      | time=2024-04-09T11:32:57.144Z level=INFO source=gpu.go:188 msg="[cudart] CUDART CUDA Compute Capability detected: 7.5"
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching knowledge bases:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.knowledgeBase.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.KnowledgeBase` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listKnowledgeBases (file:///app/.output/server/chunks/routes/api/index.get2.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get2.mjs:24:26)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'KnowledgeBase', table: 'main.KnowledgeBase' }
chatollama-1  | }
chatollama-1  | Error fetching instructions:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.instruction.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.Instruction` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listInstructions (file:///app/.output/server/chunks/routes/api/index.get.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get.mjs:20:24)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'Instruction', table: 'main.Instruction' }
chatollama-1  | }
chatollama-1  | Ollama:  { host: 'http://ollama:11434', username: null, password: null }
ollama-1      | [GIN] 2024/04/09 - 11:34:28 | 200 |        51.8µs |      172.22.0.4 | GET      "/"
chatollama-1  | Ollama:  { host: 'http://ollama:11434', username: null, password: null }
chatollama-1  | Authorization: bnVsbDpudWxs
ollama-1      | [GIN] 2024/04/09 - 11:34:28 | 200 |     366.203µs |      172.22.0.4 | GET      "/api/tags"
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching instructions:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.instruction.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.Instruction` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listInstructions (file:///app/.output/server/chunks/routes/api/index.get.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get.mjs:20:24)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'Instruction', table: 'main.Instruction' }
chatollama-1  | }
chatollama-1  | Error fetching knowledge bases:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.knowledgeBase.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.KnowledgeBase` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listKnowledgeBases (file:///app/.output/server/chunks/routes/api/index.get2.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get2.mjs:24:26)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'KnowledgeBase', table: 'main.KnowledgeBase' }
chatollama-1  | }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching instructions:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.instruction.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.Instruction` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listInstructions (file:///app/.output/server/chunks/routes/api/index.get.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get.mjs:20:24)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'Instruction', table: 'main.Instruction' }
chatollama-1  | }
chatollama-1  | Ollama:  { host: 'http://ollama:11434', username: null, password: null }
ollama-1      | [GIN] 2024/04/09 - 11:34:38 | 200 |        20.1µs |      172.22.0.4 | GET      "/"
chatollama-1  | Ollama:  { host: 'http://ollama:11434', username: null, password: null }
chatollama-1  | Authorization: bnVsbDpudWxs
ollama-1      | [GIN] 2024/04/09 - 11:34:38 | 200 |        79.6µs |      172.22.0.4 | GET      "/api/tags"
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching knowledge bases:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.knowledgeBase.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.KnowledgeBase` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listKnowledgeBases (file:///app/.output/server/chunks/routes/api/index.get2.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get2.mjs:24:26)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'KnowledgeBase', table: 'main.KnowledgeBase' }
chatollama-1  | }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching instructions:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.instruction.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.Instruction` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listInstructions (file:///app/.output/server/chunks/routes/api/index.get.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get.mjs:20:24)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'Instruction', table: 'main.Instruction' }
chatollama-1  | }
chatollama-1  | Error fetching knowledge bases:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.knowledgeBase.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.KnowledgeBase` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listKnowledgeBases (file:///app/.output/server/chunks/routes/api/index.get2.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get2.mjs:24:26)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'KnowledgeBase', table: 'main.KnowledgeBase' }
chatollama-1  | }
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching instructions:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.instruction.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.Instruction` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listInstructions (file:///app/.output/server/chunks/routes/api/index.get.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get.mjs:20:24)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'Instruction', table: 'main.Instruction' }
chatollama-1  | }
chatollama-1  | Ollama:  { host: 'http://ollama:11434', username: null, password: null }
ollama-1      | [GIN] 2024/04/09 - 11:38:25 | 200 |          34µs |      172.22.0.4 | GET      "/"
chatollama-1  | Ollama:  { host: 'http://ollama:11434', username: null, password: null }
chatollama-1  | Authorization: bnVsbDpudWxs
ollama-1      | [GIN] 2024/04/09 - 11:38:25 | 200 |     102.201µs |      172.22.0.4 | GET      "/api/tags"
chatollama-1  | Ollama:  { host: 'http://127.0.0.1:11434', username: null, password: null }
chatollama-1  | Error fetching knowledge bases:  PrismaClientKnownRequestError:
chatollama-1  | Invalid `prisma.knowledgeBase.findMany()` invocation:
chatollama-1  |
chatollama-1  |
chatollama-1  | The table `main.KnowledgeBase` does not exist in the current database.
chatollama-1  |     at In.handleRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6854)
chatollama-1  |     at In.handleAndLogRequestError (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:6188)
chatollama-1  |     at In.request (/app/.output/server/node_modules/@prisma/client/runtime/library.js:122:5896)
chatollama-1  |     at async l (/app/.output/server/node_modules/@prisma/client/runtime/library.js:127:11167)
chatollama-1  |     at async listKnowledgeBases (file:///app/.output/server/chunks/routes/api/index.get2.mjs:13:12)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/routes/api/index.get2.mjs:24:26)
chatollama-1  |     at async Object.handler (file:///app/.output/server/chunks/runtime.mjs:2963:19)
chatollama-1  |     at async Server.toNodeHandle (file:///app/.output/server/chunks/runtime.mjs:3229:7) {
chatollama-1  |   code: 'P2021',
chatollama-1  |   clientVersion: '5.12.1',
chatollama-1  |   meta: { modelName: 'KnowledgeBase', table: 'main.KnowledgeBase' }
chatollama-1  | }