fix: omit distribution and cpu_offload fields from default spec
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
.alert-info-block {
|
.alert-info-block {
|
||||||
padding: 6px 10px;
|
padding-block: 6px;
|
||||||
|
padding-inline: 10px 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 32px;
|
padding-left: 32px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const AlertInfo: React.FC<AlertInfoProps> = (props) => {
|
|||||||
{title && (
|
{title && (
|
||||||
<TitleWrapper className="title-text">{title}</TitleWrapper>
|
<TitleWrapper className="title-text">{title}</TitleWrapper>
|
||||||
)}
|
)}
|
||||||
<OverlayScroller maxHeight={80} style={{ ...contentStyle }}>
|
<OverlayScroller maxHeight={86} style={{ ...contentStyle }}>
|
||||||
<ContentWrapper
|
<ContentWrapper
|
||||||
$hasTitle={!!title}
|
$hasTitle={!!title}
|
||||||
className={classNames('content', type)}
|
className={classNames('content', type)}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
'Select a label to generate the command and copy it using the copy button.',
|
'Select a label to generate the command and copy it using the copy button.',
|
||||||
'resources.worker.script.install': 'Script Installation',
|
'resources.worker.script.install': 'Script Installation',
|
||||||
'resources.worker.container.install': 'Container Installation(Linux Only)',
|
'resources.worker.container.install': 'Container Installation(Linux Only)',
|
||||||
'resources.worker.cann.tips': `Set <span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES</span> to the required GPU indices. For GPU0 to GPU3, use <span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES=0,1,2,3</span> or <span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES=0-3</span>.`,
|
'resources.worker.cann.tips': `Set <span style="color: #000;font-weight: 600">--device /dev/davinci{index}</span> according to the required NPU index. For example, to mount NPU0 and NPU1, add <span style="color: #000;font-weight: 600">--device /dev/davinci0 --device /dev/davinci1</span>.`,
|
||||||
'resources.modelfiles.form.path': 'Storage Path',
|
'resources.modelfiles.form.path': 'Storage Path',
|
||||||
'resources.modelfiles.modelfile': 'Model Files',
|
'resources.modelfiles.modelfile': 'Model Files',
|
||||||
'resources.modelfiles.download': 'Add Model File',
|
'resources.modelfiles.download': 'Add Model File',
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
'ラベルを選択してコマンドを生成し、コピーを使用してコマンドをコピーします。',
|
'ラベルを選択してコマンドを生成し、コピーを使用してコマンドをコピーします。',
|
||||||
'resources.worker.script.install': 'スクリプトインストール',
|
'resources.worker.script.install': 'スクリプトインストール',
|
||||||
'resources.worker.container.install': 'コンテナインストール(Linuxのみ)',
|
'resources.worker.container.install': 'コンテナインストール(Linuxのみ)',
|
||||||
'resources.worker.cann.tips': `<span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES</span> を必要なGPUインデックスに設定します。GPU0からGPU3の場合、<span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES=0,1,2,3</span> または <span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES=0-3</span> を使用します。`,
|
'resources.worker.cann.tips': `Set <span style="color: #000;font-weight: 600">--device /dev/davinci{index}</span> according to the required NPU index. For example, to mount NPU0 and NPU1, add <span style="color: #000;font-weight: 600">--device /dev/davinci0 --device /dev/davinci1</span>.`,
|
||||||
'resources.modelfiles.form.path': 'Storage Path',
|
'resources.modelfiles.form.path': 'Storage Path',
|
||||||
'resources.modelfiles.modelfile': 'Model Files',
|
'resources.modelfiles.modelfile': 'Model Files',
|
||||||
'resources.modelfiles.download': 'Add Model File',
|
'resources.modelfiles.download': 'Add Model File',
|
||||||
@@ -93,5 +93,6 @@ export default {
|
|||||||
// 14. 'resources.worker.add.step2.tips',
|
// 14. 'resources.worker.add.step2.tips',
|
||||||
// 15. 'resources.modelfiles.copy.tips',
|
// 15. 'resources.modelfiles.copy.tips',
|
||||||
// 16. 'resources.filter.path',
|
// 16. 'resources.filter.path',
|
||||||
// 17. 'resources.form.workerSelector.description
|
// 17. 'resources.form.workerSelector.description,
|
||||||
|
// 18. 'resources.worker.cann.tips',
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
'Выберите метку для генерации команды и скопируйте её.',
|
'Выберите метку для генерации команды и скопируйте её.',
|
||||||
'resources.worker.script.install': 'Установка скриптом',
|
'resources.worker.script.install': 'Установка скриптом',
|
||||||
'resources.worker.container.install': 'Установка контейнером (только Linux)',
|
'resources.worker.container.install': 'Установка контейнером (только Linux)',
|
||||||
'resources.worker.cann.tips': `Укажите индексы GPU через <span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES=0,1,2,3</span> или <span style='color: #000;font-weight: 600'>ASCEND_VISIBLE_DEVICES=0-3</span>.`,
|
'resources.worker.cann.tips': `Set <span style="color: #000;font-weight: 600">--device /dev/davinci{index}</span> according to the required NPU index. For example, to mount NPU0 and NPU1, add <span style="color: #000;font-weight: 600">--device /dev/davinci0 --device /dev/davinci1</span>.`,
|
||||||
'resources.modelfiles.form.path': 'Путь хранения',
|
'resources.modelfiles.form.path': 'Путь хранения',
|
||||||
'resources.modelfiles.modelfile': 'Файлы моделей',
|
'resources.modelfiles.modelfile': 'Файлы моделей',
|
||||||
'resources.modelfiles.download': 'Добавить файл модели',
|
'resources.modelfiles.download': 'Добавить файл модели',
|
||||||
@@ -75,5 +75,5 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||||
|
// 1. 'resources.worker.cann.tips'
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export default {
|
|||||||
'resources.worker.script.install': '脚本安装',
|
'resources.worker.script.install': '脚本安装',
|
||||||
'resources.worker.container.install': '容器安装(仅支持 Linux)',
|
'resources.worker.container.install': '容器安装(仅支持 Linux)',
|
||||||
'resources.worker.cann.tips':
|
'resources.worker.cann.tips':
|
||||||
'按需要挂载的 GPU index 设置 <span style="color: #000;font-weight: 600">ASCEND_VISIBLE_DEVICES</span>,如需挂载 GPU0 - GPU3,则设为 <span style="color: #000;font-weight: 600">ASCEND_VISIBLE_DEVICES=0,1,2,3</span> 或 <span style="color: #000;font-weight: 600">ASCEND_VISIBLE_DEVICES=0-3</span>',
|
'按需要挂载的 NPU index 设置 <span style="color: #000;font-weight: 600">--device /dev/davinci{index}</span>,如需挂载 NPU0 - NPU1,则添加 <span style="color: #000;font-weight: 600">--device /dev/davinci0 --device /dev/davinci1</span>',
|
||||||
'resources.modelfiles.form.path': '存储路径',
|
'resources.modelfiles.form.path': '存储路径',
|
||||||
'resources.modelfiles.modelfile': '模型文件',
|
'resources.modelfiles.modelfile': '模型文件',
|
||||||
'resources.modelfiles.download': '添加模型文件',
|
'resources.modelfiles.download': '添加模型文件',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
LoadingOutlined,
|
LoadingOutlined,
|
||||||
WarningFilled
|
WarningFilled
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
|
import { Button } from 'antd';
|
||||||
import { isArray } from 'lodash';
|
import { isArray } from 'lodash';
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
@@ -24,13 +25,19 @@ interface CompatibilityAlertProps {
|
|||||||
|
|
||||||
const DivWrapper = styled.div`
|
const DivWrapper = styled.div`
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-inline: 12px;
|
padding-inline: 8px;
|
||||||
|
&:hover {
|
||||||
|
.close-wrapper {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const CloseWrapper = styled.div`
|
const CloseWrapper = styled.div`
|
||||||
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 12px;
|
top: 6px;
|
||||||
right: 18px;
|
right: 12px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: var(--ant-color-warning-bg);
|
background-color: var(--ant-color-warning-bg);
|
||||||
@@ -98,8 +105,13 @@ const CompatibilityAlert: React.FC<CompatibilityAlertProps> = (props) => {
|
|||||||
icon={renderIcon}
|
icon={renderIcon}
|
||||||
></AlertBlockInfo>
|
></AlertBlockInfo>
|
||||||
{showClose && !['transition', 'success'].includes(type) && (
|
{showClose && !['transition', 'success'].includes(type) && (
|
||||||
<CloseWrapper onClick={onClose}>
|
<CloseWrapper className="close-wrapper">
|
||||||
<CloseOutlined />
|
<Button
|
||||||
|
onClick={onClose}
|
||||||
|
icon={<CloseOutlined />}
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
></Button>
|
||||||
</CloseWrapper>
|
</CloseWrapper>
|
||||||
)}
|
)}
|
||||||
</DivWrapper>
|
</DivWrapper>
|
||||||
|
|||||||
@@ -99,6 +99,14 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
const [isGGUF, setIsGGUF] = useState<boolean>(props.isGGUF || false);
|
const [isGGUF, setIsGGUF] = useState<boolean>(props.isGGUF || false);
|
||||||
const modelFileRef = useRef<any>(null);
|
const modelFileRef = useRef<any>(null);
|
||||||
|
|
||||||
|
const getDefaultSpec = (item: any) => {
|
||||||
|
const defaultSpec = item.evaluateResult?.default_spec || {};
|
||||||
|
return _.omit(defaultSpec, [
|
||||||
|
'cpu_offloading',
|
||||||
|
'distributed_inference_across_workers'
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
||||||
const getCategory = (item: any) => {
|
const getCategory = (item: any) => {
|
||||||
const categories = item.evaluateResult?.default_spec?.categories || [];
|
const categories = item.evaluateResult?.default_spec?.categories || [];
|
||||||
if (Array.isArray(categories)) {
|
if (Array.isArray(categories)) {
|
||||||
@@ -111,7 +119,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
const modelInfo = onSelectModel(selectedModel, props.source);
|
const modelInfo = onSelectModel(selectedModel, props.source);
|
||||||
form.current?.setFieldsValue?.({
|
form.current?.setFieldsValue?.({
|
||||||
file_name: item.fakeName,
|
file_name: item.fakeName,
|
||||||
...item.evaluateResult?.default_spec,
|
...getDefaultSpec(item),
|
||||||
...modelInfo,
|
...modelInfo,
|
||||||
categories: getCategory(item)
|
categories: getCategory(item)
|
||||||
});
|
});
|
||||||
@@ -129,7 +137,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
const modelInfo = onSelectModel(item, props.source);
|
const modelInfo = onSelectModel(item, props.source);
|
||||||
handleShowCompatibleAlert(item.evaluateResult);
|
handleShowCompatibleAlert(item.evaluateResult);
|
||||||
form.current?.setFieldsValue?.({
|
form.current?.setFieldsValue?.({
|
||||||
...item.evaluateResult?.default_spec,
|
...getDefaultSpec(item),
|
||||||
...modelInfo,
|
...modelInfo,
|
||||||
categories: getCategory(item)
|
categories: getCategory(item)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -70,6 +70,11 @@ export const HuggingFaceModels = [
|
|||||||
type: 'tts',
|
type: 'tts',
|
||||||
org: 'FunAudioLLM',
|
org: 'FunAudioLLM',
|
||||||
name: 'CosyVoice-300M'
|
name: 'CosyVoice-300M'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'tts',
|
||||||
|
org: 'FunAudioLLM',
|
||||||
|
name: 'CosyVoice2-0.5B'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -104,6 +109,11 @@ export const ModelScopeModels = [
|
|||||||
org: 'iic',
|
org: 'iic',
|
||||||
name: 'CosyVoice-300M-25Hz'
|
name: 'CosyVoice-300M-25Hz'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'tts',
|
||||||
|
org: 'iic',
|
||||||
|
name: 'CosyVoice2-0.5B'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'tts',
|
type: 'tts',
|
||||||
org: 'iic',
|
org: 'iic',
|
||||||
|
|||||||
@@ -62,7 +62,16 @@ export const addWorkerGuide: Record<string, any> = {
|
|||||||
}) {
|
}) {
|
||||||
return `docker run -d --name gpustack \
|
return `docker run -d --name gpustack \
|
||||||
--restart=unless-stopped \
|
--restart=unless-stopped \
|
||||||
-e ASCEND_VISIBLE_DEVICES=0,1 \
|
--device /dev/davinci0 \
|
||||||
|
--device /dev/davinci1 \
|
||||||
|
--device /dev/davinci_manager \
|
||||||
|
--device /dev/devmm_svm \
|
||||||
|
--device /dev/hisi_hdc \
|
||||||
|
-v /usr/local/dcmi:/usr/local/dcmi \
|
||||||
|
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
|
||||||
|
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
|
||||||
|
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
|
||||||
|
-v /etc/ascend_install.info:/etc/ascend_install.info \
|
||||||
--network=host \
|
--network=host \
|
||||||
--ipc=host \
|
--ipc=host \
|
||||||
-v gpustack-data:/var/lib/gpustack \
|
-v gpustack-data:/var/lib/gpustack \
|
||||||
@@ -70,6 +79,34 @@ export const addWorkerGuide: Record<string, any> = {
|
|||||||
--server-url ${params.server} --token ${params.token} --worker-ip ${params.workerip}`;
|
--server-url ${params.server} --token ${params.token} --worker-ip ${params.workerip}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
npu310p: {
|
||||||
|
getToken:
|
||||||
|
'Get-Content -Path (Join-Path -Path $env:APPDATA -ChildPath "gpustack\\token") -Raw',
|
||||||
|
registerWorker(params: {
|
||||||
|
server: string;
|
||||||
|
tag: string;
|
||||||
|
token: string;
|
||||||
|
workerip: string;
|
||||||
|
}) {
|
||||||
|
return `docker run -d --name gpustack \
|
||||||
|
--restart=unless-stopped \
|
||||||
|
--device /dev/davinci0 \
|
||||||
|
--device /dev/davinci1 \
|
||||||
|
--device /dev/davinci_manager \
|
||||||
|
--device /dev/devmm_svm \
|
||||||
|
--device /dev/hisi_hdc \
|
||||||
|
-v /usr/local/dcmi:/usr/local/dcmi \
|
||||||
|
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
|
||||||
|
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
|
||||||
|
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
|
||||||
|
-v /etc/ascend_install.info:/etc/ascend_install.info \
|
||||||
|
--network=host \
|
||||||
|
--ipc=host \
|
||||||
|
-v gpustack-data:/var/lib/gpustack \
|
||||||
|
gpustack/gpustack:${params.tag}-310p \
|
||||||
|
--server-url ${params.server} --token ${params.token} --worker-ip ${params.workerip}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
musa: {
|
musa: {
|
||||||
getToken:
|
getToken:
|
||||||
'Get-Content -Path (Join-Path -Path $env:APPDATA -ChildPath "gpustack\\token") -Raw',
|
'Get-Content -Path (Join-Path -Path $env:APPDATA -ChildPath "gpustack\\token") -Raw',
|
||||||
|
|||||||
Reference in New Issue
Block a user