chore: restart on error

This commit is contained in:
jialin
2025-03-31 16:21:40 +08:00
parent f83e49bd3d
commit eff88528d3
20 changed files with 162 additions and 105 deletions
@@ -41,7 +41,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
width={700}
styles={{
body: {
height: 620
height: 650
}
}}
footer={null}
@@ -81,7 +81,12 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
</li>
</ul>
<h3 className="font-size-14 font-600">
1. {intl.formatMessage({ id: 'resources.worker.add.step1' })}
1.{' '}
<span
dangerouslySetInnerHTML={{
__html: intl.formatMessage({ id: 'resources.worker.add.step1' })
}}
></span>
</h3>
<HighlightCode
code={addWorkerGuide.container.getToken}
@@ -24,6 +24,7 @@ import {
modelFileActions,
onLineSourceOptions
} from '@/pages/llmodels/config/button-actions';
import { SourceType } from '@/pages/llmodels/config/types';
import DownloadModal from '@/pages/llmodels/download';
import { convertFileSize } from '@/utils';
import { useIntl, useNavigate } from '@umijs/max';
@@ -170,7 +171,7 @@ const ModelFiles = () => {
const [openDeployModal, setOpenDeployModal] = useState<{
show: boolean;
width: number | string;
source: string;
source: SourceType;
gpuOptions: any[];
modelFileOptions?: any[];
initialValues: any;
@@ -178,7 +179,7 @@ const ModelFiles = () => {
}>({
show: false,
width: 600,
source: modelSourceMap.local_path_value,
source: modelSourceMap.local_path_value as SourceType,
gpuOptions: [],
modelFileOptions: [],
initialValues: {},
@@ -23,7 +23,9 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
return (
<div className="script-install">
<h3 className="font-size-14 font-600">1. {labels.step1}</h3>
<h3 className="font-size-14 font-600">
1. <span dangerouslySetInnerHTML={{ __html: labels.step1 }}></span>
</h3>
<h4 className="font-size-13">{labels.linuxOrMac}</h4>
<HighlightCode
code={addWorkerGuide.mac.getToken}
@@ -52,7 +54,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
})}
theme="dark"
></HighlightCode>
<h4 className="m-t-6 font-size-13">Windows </h4>
<h4 className="m-t-6 font-size-13">Windows</h4>
<HighlightCode
theme="dark"
code={addWorkerGuide.win.registerWorker({