fix: update command of adding worker

This commit is contained in:
jialin
2025-12-19 20:33:25 +08:00
parent 8008099e71
commit 707eb15465
14 changed files with 254 additions and 38 deletions
@@ -9,13 +9,17 @@ import VendorNotes from './vendor-notes';
const DockerRunCommand = () => {
const intl = useIntl();
const { registrationInfo, stepList, summary, clusterList } =
useAddWorkerContext();
const { registrationInfo, stepList, summary } = useAddWorkerContext();
const workerIPConfig = summary.get('workerIPConfig') || {
enable: false,
ip: '',
required: false
};
const externalWorkerIPConfig = summary.get('externalWorkerIPConfig') || {
enable: false,
ip: '',
required: false
};
const modelDirConfig = summary.get('modelDirConfig') || {
enable: false,
path: '',
@@ -62,6 +66,9 @@ const DockerRunCommand = () => {
</Tips>
<AddWorkerCommand
registrationInfo={registrationInfo}
advertisAddress={
externalWorkerIPConfig.enable ? externalWorkerIPConfig.ip : ''
}
workerIP={workerIPConfig.enable ? workerIPConfig.ip : ''}
modelDir={modelDirConfig.enable ? modelDirConfig.path : ''}
cacheDir={cacheDirConfig.enable ? cacheDirConfig.path : ''}