Skip to content

Commit

Permalink
fix: gate onnx and tensorrt-llm run on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Jul 4, 2024
1 parent e2b5d5d commit 7073988
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cortex-js/src/infrastructure/commanders/shortcuts/run.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export class RunCommand extends CommandRunner {
exit(1);
}
}

// Check model compatibility on this machine
await checkModelCompatibility(modelId);

// If not exist
// Try Pull
if (!(await this.modelsCliUsecases.getModel(modelId))) {
Expand All @@ -73,16 +77,11 @@ export class RunCommand extends CommandRunner {
!Array.isArray(existingModel.files) ||
/^(http|https):\/\/[^/]+\/.*/.test(existingModel.files[0])
) {
checkingSpinner.fail(
`Model is not available`
);
checkingSpinner.fail(`Model is not available`);
process.exit(1);
}
checkingSpinner.succeed('Model found');

// Check model compatibility on this machine
await checkModelCompatibility(modelId);

const engine = existingModel.engine || Engines.llamaCPP;
// Pull engine if not exist
if (
Expand Down

0 comments on commit 7073988

Please sign in to comment.