fix: improve download logging (#325)

* Suggest use `-it` so docker run generate progress bar of downloading information properly

* add info! log for model download
release-0.0
Meng Zhang 2023-08-02 14:30:35 +08:00 committed by GitHub
parent b8308b7118
commit 57c811b30f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

1
Cargo.lock generated
View File

@ -2834,6 +2834,7 @@ dependencies = [
"serdeconv",
"tabby-common",
"tokio-retry",
"tracing",
]
[[package]]

View File

@ -11,4 +11,5 @@ reqwest = { version = "0.11.18", features = ["stream", "json"] }
anyhow = { workspace = true }
serde = { workspace = true }
serdeconv = { workspace = true }
tracing = { worksapce = true }
tokio-retry = "0.3.0"

View File

@ -11,6 +11,7 @@ use tokio_retry::{
strategy::{jitter, ExponentialBackoff},
Retry,
};
use tracing::info;
impl CacheInfo {
async fn download(
@ -62,6 +63,8 @@ pub async fn download_model(model_id: &str, prefer_local_file: bool) -> Result<(
return Ok(());
}
info!("Start downloading model `{}`", model_id);
let mut cache_info = CacheInfo::from(model_id).await;
let optional_files = vec![

View File

@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem';
<TabItem value="shell" label="Shell" default>
```bash title="run.sh"
docker run \
docker run -it \
-p 8080:8080 -v $HOME/.tabby:/data \
tabbyml/tabby serve --model TabbyML/SantaCoder-1B
```
@ -43,7 +43,7 @@ services:
<TabItem value="shell" label="Shell" default>
```bash title="run.sh"
docker run \
docker run -it \
--gpus all -p 8080:8080 -v $HOME/.tabby:/data \
tabbyml/tabby \
serve --model TabbyML/SantaCoder-1B --device cuda