TabbyML / tabby

Self-hosted AI coding assistant
https://tabby.tabbyml.com/
Other
20.75k stars 939 forks source link

how to start DeepseekCoder-6.7B #2620

Open hytxx opened 1 month ago

hytxx commented 1 month ago
  1. docker pull tabbyml/tabby:latest ps: version 0.13.1
  2. git clone https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-base
  3. download gguf from https://github.com/wsxiaoys/registry-tabby/blob/e9b46bc14eed06f10c27467263b405ddabbae428/models.json#L42
  4. mkdir ggml and create tabby.json Tabby Model Specification
  5. run docker run -it --gpus all -p 8080:8080 -v /home/ai/.tabby:/data -e RUST_BACKTRACE=full tabbyml/tabby serve --model /data/models/TabbyML/DeepseekCoder-6.7B --device cuda

but got error:

2024-07-11T07:35:33.805755Z INFO tabby::services::model: crates/tabby/src/services/model/mod.rs:44: Loading model from local path /data/models/TabbyML/DeepseekCoder-6.7B

The application panicked (crashed).

Message: Failed to fetch model organization : Failed to download

Caused by:

0: error sending request for url (https://raw.githubusercontent.com/TabbyML/registry-tabby/main/models.json)

1: client error (Connect)

2: tcp connect error: Cannot assign requested address (os error 99)

3: Cannot assign requested address (os error 99)

Stack backtrace:

0: tabby_common::registry::ModelRegistry::new::{{closure}}

1: tabby_download::download_model::{{closure}}

2: tabby::services::model::download_model_if_needed::{{closure}}

3: tabby::main::{{closure}}

4: tokio::runtime::park::CachedParkThread::block_on

5: tokio::runtime::context::runtime::enter_runtime

6: tokio::runtime::runtime::Runtime::block_on

7: tabby::main

8: std::sys_common::backtrace::__rust_begin_short_backtrace

9: std::rt::lang_start::{{closure}}

10: core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284:13

11: std::panicking::try::do_call

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40

12: std::panicking::try

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19

13: std::panic::catch_unwind

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14

14: std::rt::lang_start_internal::{{closure}}

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:48

15: std::panicking::try::do_call

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40

16: std::panicking::try

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19

17: std::panic::catch_unwind

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14

18: std::rt::lang_start_internal

         at ./rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:20

19: main

20:

21: __libc_start_main

22: _start

Location: /root/workspace/crates/tabby-common/src/registry.rs:62

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

                            ⋮ 8 frames hidden ⋮                               

9: tabby_common::registry::ModelRegistry::new::{{closure}}::h9fc5b5910c59e2d4

  at <unknown source file>:<unknown line>

10: tabby_download::download_model::{{closure}}::h2afaf8f50140f7e0

  at <unknown source file>:<unknown line>

11: tabby::services::model::download_model_if_needed::{{closure}}::h7a37e0f73e254e39

  at <unknown source file>:<unknown line>

12: tabby::main::{{closure}}::h2bdc8533ce6aacb4

  at <unknown source file>:<unknown line>

13: tokio::runtime::park::CachedParkThread::block_on::he18aa8b73cf5abd3

  at <unknown source file>:<unknown line>

14: tokio::runtime::context::runtime::enter_runtime::h71d9772cbcdeefc6

  at <unknown source file>:<unknown line>

15: tokio::runtime::runtime::Runtime::block_on::h2c17fbddcce4400e

  at <unknown source file>:<unknown line>

16: tabby::main::hece9075b72caf8e4

  at <unknown source file>:<unknown line>

17: std::sys_common::backtrace::__rust_begin_short_backtrace::he1d35793bc872d1d

  at <unknown source file>:<unknown line>

18: std::rt::lang_start::{{closure}}::h7bcf0ff8d5702892

  at <unknown source file>:<unknown line>

19: core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::h37600b1e5eea4ecd

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284

20: std::panicking::try::do_call::hb4bda49fa13a0c2b

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552

21: std::panicking::try::h8bbf75149211aaaa

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516

22: std::panic::catch_unwind::h8c78ec68ebea34cb

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142

23: std::rt::lang_start_internal::{{closure}}::hffdf44a19fd9e220

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148

24: std::panicking::try::do_call::hcb3194972c74716d

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552

25: std::panicking::try::hcdc6892c5f0dba4c

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516

26: std::panic::catch_unwind::h4910beb4573f4776

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142

27: std::rt::lang_start_internal::h6939038e2873596b

  at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148

28: main

  at <unknown source file>:<unknown line>

29: __libc_start_main

  at <unknown source file>:<unknown line>

30: _start

  at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.

then I don't know what to do next.

hytxx commented 1 month ago

I'm probably guessing that the error was reported because of an issue with downloading the model, since I'm deploying in an intranet environment and don't have access to the web, I manually downloaded the required model, but I don't know why it's still going to download it, is there some step I'm missing?

wsxiaoys commented 1 month ago

Hi - for air gapped deployment, please refer https://tabby.tabbyml.com/blog/2024/03/25/deploy-tabby-in-air-gapped-environment-with-docker/

hytxx commented 1 month ago

Hi - for air gapped deployment, please refer https://tabby.tabbyml.com/blog/2024/03/25/deploy-tabby-in-air-gapped-environment-with-docker/您好 - 对于气隙部署,请参阅 https://tabby.tabbyml.com/blog/2024/03/25/deploy-tabby-in-air-gapped-environment-with-docker/

`DEPRECATED: The legacy builder is deprecated and will be removed in a future release.

        Install the buildx component to build images with BuildKit:

        https://docs.docker.com/go/buildx/

Sending build context to Docker daemon 2.048kB

Step 1/3 : FROM tabbyml/tabby

---> 769a715d2734

Step 2/3 : ENV TABBY_MODEL_CACHE_ROOT=/models

---> Running in 9270f44db966

Removing intermediate container 9270f44db966

---> 4e76ce942890

Step 3/3 : RUN /opt/tabby/bin/tabby-cpu download --model StarCoder-1B

---> Running in 3d323eda316e

The application panicked (crashed).

Message: Failed to fetch model organization : Failed to download

Caused by:

0: error sending request for url (https://raw.githubusercontent.com/TabbyML/registry-tabby/main/models.json)

1: client error (Connect)

2: tcp connect error: Cannot assign requested address (os error 99)

3: Cannot assign requested address (os error 99)

Location: /root/workspace/crates/tabby-common/src/registry.rs:62

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.

Run with RUST_BACKTRACE=full to include source snippets.

The command '/bin/sh -c /opt/tabby/bin/tabby-cpu download --model StarCoder-1B' returned a non-zero code: 101

`

Because of the region problem, I can't download the model directly, follow my steps above, download the model manually and then specify the model path, why doesn't this work?

hytxx commented 1 month ago

Hi - for air gapped deployment, please refer https://tabby.tabbyml.com/blog/2024/03/25/deploy-tabby-in-air-gapped-environment-with-docker/您好 - 对于气隙部署,请参阅 https://tabby.tabbyml.com/blog/2024/03/25/deploy-tabby-in-air-gapped-environment-with-docker/

image