[GH-ISSUE #2444] Ollama docker container crash full WSL2 Ubuntu #1426

Closed
opened 2026-04-12 11:18:12 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @wizd on GitHub (Feb 11, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2444

Originally assigned to: @dhiltgen on GitHub.

docker container setup as bellow.

version: "3.7"

services:
  ollama:
    container_name: ollama
    image: ollama/ollama:latest
    ports:
      - "5310:11434"
    volumes:
      - ./ollama:/root/.ollama
    restart: unless-stopped
    environment:
      - CUDA_VISIBLE_DEVICES=0,1
      - OLLAMA_ORIGINS=*
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

  ollama-webui:
    image: ghcr.io/ollama-webui/ollama-webui:main
    container_name: ollama-webui
    ports:
      - "7000:8080"
    volumes:
      - ./ollama-webui1:/app/backend/data
    environment:
      - 'OLLAMA_API_BASE_URL=http://ollama:11434/api'
    restart: unless-stopped

modelfile as bellow:

FROM miqu-1-70b.q2_k.gguf
PARAMETER num_ctx 24000
PARAMETER num_gpu 81

logs:

...
....................................................................................................
llama_new_context_with_model: n_ctx      = 26000
llama_new_context_with_model: freq_base  = 1000000.0
llama_new_context_with_model: freq_scale = 1
llama_kv_cache_init:      CUDA0 KV buffer size =  4164.06 MiB
llama_kv_cache_init:      CUDA1 KV buffer size =  3960.94 MiB
llama_new_context_with_model: KV self size  = 8125.00 MiB, K (f16): 4062.50 MiB, V (f16): 4062.50 MiB
llama_new_context_with_model:  CUDA_Host input buffer size   =    66.88 MiB
llama_new_context_with_model:      CUDA0 compute buffer size =  3683.66 MiB
llama_new_context_with_model:      CUDA1 compute buffer size =  3683.66 MiB
llama_new_context_with_model:  CUDA_Host compute buffer size =    17.60 MiB
llama_new_context_with_model: graph splits (measure): 5
time=2024-02-10T01:16:44.820Z level=INFO source=dyn_ext_server.go:156 msg="Starting llama main loop"
[GIN] 2024/02/10 - 01:16:52 | 200 |  46.01445749s |      172.22.0.1 | POST     "/api/generate"
[GIN] 2024/02/10 - 01:17:02 | 200 |  9.530461175s |      172.22.0.1 | POST     "/api/generate"
[GIN] 2024/02/10 - 01:17:11 | 200 |  9.062014736s |      172.22.0.1 | POST     "/api/generate"
error from daemon in stream: Error grabbing logs: invalid character '\x00' looking for beginning of value

(base) super@dev-local-ai:~/data/ollama$ docker logs -f ollama
[已退出进程,代码为 1 (0x00000001)]
现在可以使用Ctrl+D关闭此终端,或按 Enter 重新启动。
远程主机强迫关闭了一个现有的连接。
Error code: Wsl/Service/0x80072746
Press any key to continue...
Originally created by @wizd on GitHub (Feb 11, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2444 Originally assigned to: @dhiltgen on GitHub. docker container setup as bellow. ``` version: "3.7" services: ollama: container_name: ollama image: ollama/ollama:latest ports: - "5310:11434" volumes: - ./ollama:/root/.ollama restart: unless-stopped environment: - CUDA_VISIBLE_DEVICES=0,1 - OLLAMA_ORIGINS=* deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] ollama-webui: image: ghcr.io/ollama-webui/ollama-webui:main container_name: ollama-webui ports: - "7000:8080" volumes: - ./ollama-webui1:/app/backend/data environment: - 'OLLAMA_API_BASE_URL=http://ollama:11434/api' restart: unless-stopped ``` modelfile as bellow: ``` FROM miqu-1-70b.q2_k.gguf PARAMETER num_ctx 24000 PARAMETER num_gpu 81 ``` logs: ``` ... .................................................................................................... llama_new_context_with_model: n_ctx = 26000 llama_new_context_with_model: freq_base = 1000000.0 llama_new_context_with_model: freq_scale = 1 llama_kv_cache_init: CUDA0 KV buffer size = 4164.06 MiB llama_kv_cache_init: CUDA1 KV buffer size = 3960.94 MiB llama_new_context_with_model: KV self size = 8125.00 MiB, K (f16): 4062.50 MiB, V (f16): 4062.50 MiB llama_new_context_with_model: CUDA_Host input buffer size = 66.88 MiB llama_new_context_with_model: CUDA0 compute buffer size = 3683.66 MiB llama_new_context_with_model: CUDA1 compute buffer size = 3683.66 MiB llama_new_context_with_model: CUDA_Host compute buffer size = 17.60 MiB llama_new_context_with_model: graph splits (measure): 5 time=2024-02-10T01:16:44.820Z level=INFO source=dyn_ext_server.go:156 msg="Starting llama main loop" [GIN] 2024/02/10 - 01:16:52 | 200 | 46.01445749s | 172.22.0.1 | POST "/api/generate" [GIN] 2024/02/10 - 01:17:02 | 200 | 9.530461175s | 172.22.0.1 | POST "/api/generate" [GIN] 2024/02/10 - 01:17:11 | 200 | 9.062014736s | 172.22.0.1 | POST "/api/generate" error from daemon in stream: Error grabbing logs: invalid character '\x00' looking for beginning of value (base) super@dev-local-ai:~/data/ollama$ docker logs -f ollama [已退出进程,代码为 1 (0x00000001)] 现在可以使用Ctrl+D关闭此终端,或按 Enter 重新启动。 远程主机强迫关闭了一个现有的连接。 Error code: Wsl/Service/0x80072746 Press any key to continue... ```
Author
Owner

@dhiltgen commented on GitHub (Mar 11, 2024):

This looks like it might be a low-level docker problem, but I'm not sure.

Can you try running the container using docker run -it ... and see if we can see more error reporting?

<!-- gh-comment-id:1989640535 --> @dhiltgen commented on GitHub (Mar 11, 2024): This looks like it might be a low-level docker problem, but I'm not sure. Can you try running the container using `docker run -it ...` and see if we can see more error reporting?
Author
Owner

@dhiltgen commented on GitHub (Mar 27, 2024):

If you're still having problems, please share logs from a stand-alone interactive container run.

<!-- gh-comment-id:2023977039 --> @dhiltgen commented on GitHub (Mar 27, 2024): If you're still having problems, please share logs from a stand-alone interactive container run.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1426