fix: improve download logging (#325)
* Suggest use `-it` so docker run generate progress bar of downloading information properly * add info! log for model downloadrelease-0.0
parent
b8308b7118
commit
57c811b30f
|
|
@ -2834,6 +2834,7 @@ dependencies = [
|
|||
"serdeconv",
|
||||
"tabby-common",
|
||||
"tokio-retry",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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![
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue