This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
cortex-js/src/infrastructure/commanders Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { BaseCommand } from '../base.command';
1818import { downloadProgress } from '@/utils/download-progress' ;
1919import { CortexClient } from '../services/cortex.client' ;
2020import { DownloadType } from '@/domain/models/download.interface' ;
21+ import ora from 'ora' ;
2122
2223@SubCommand ( {
2324 name : 'pull' ,
@@ -52,13 +53,16 @@ export class ModelPullCommand extends BaseCommand {
5253 exit ( 1 ) ;
5354 }
5455
56+ console . log ( 'Downloading model...' ) ;
5557 await this . cortex . models . download ( modelId ) . catch ( ( e : Error ) => {
5658 if ( e instanceof ModelNotFoundException )
5759 console . error ( 'Model does not exist.' ) ;
5860 else console . error ( e . message ?? e ) ;
5961 exit ( 1 ) ;
6062 } ) ;
6163
64+ ora ( ) . succeed ( 'Model downloaded' ) ;
65+
6266 await downloadProgress ( this . cortex , modelId ) ;
6367
6468 const existingModel = await this . cortex . models . retrieve ( modelId ) ;
Original file line number Diff line number Diff line change @@ -62,12 +62,14 @@ export class RunCommand extends BaseCommand {
6262 if ( ! ( await this . cortex . models . retrieve ( modelId ) ) ) {
6363 checkingSpinner . succeed ( ) ;
6464
65+ console . log ( 'Downloading model...' ) ;
6566 await this . cortex . models . download ( modelId ) . catch ( ( e : Error ) => {
6667 checkingSpinner . fail ( e . message ?? e ) ;
6768 exit ( 1 ) ;
6869 } ) ;
6970 await downloadProgress ( this . cortex , modelId ) ;
7071 }
72+ ora ( ) . succeed ( 'Model downloaded' ) ;
7173
7274 // Second check if model is available
7375 const existingModel = await this . cortex . models . retrieve ( modelId ) ;
You can’t perform that action at this time.
0 commit comments