@cloud-ru/uikit-product-calculator 0.35.7 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/config/platforms/evolution/catalog.js +1 -1
- package/dist/cjs/config/platforms/evolution/constants.d.ts +1 -0
- package/dist/cjs/config/platforms/evolution/constants.js +1 -0
- package/dist/cjs/config/platforms/evolution/product-config/EvolutionNotebooks.d.ts +2 -0
- package/dist/cjs/config/platforms/evolution/product-config/EvolutionNotebooks.js +109 -0
- package/dist/cjs/config/platforms/evolution/product-config/index.d.ts +1 -0
- package/dist/cjs/config/platforms/evolution/product-config/index.js +1 -0
- package/dist/cjs/config/platforms/evolution/products.js +13 -6
- package/dist/cjs/config/utils/index.d.ts +1 -0
- package/dist/cjs/config/utils/index.js +1 -0
- package/dist/cjs/config/utils/notebooks.d.ts +10 -0
- package/dist/cjs/config/utils/notebooks.js +26 -0
- package/dist/esm/config/platforms/evolution/catalog.js +1 -1
- package/dist/esm/config/platforms/evolution/constants.d.ts +1 -0
- package/dist/esm/config/platforms/evolution/constants.js +1 -0
- package/dist/esm/config/platforms/evolution/product-config/EvolutionNotebooks.d.ts +2 -0
- package/dist/esm/config/platforms/evolution/product-config/EvolutionNotebooks.js +106 -0
- package/dist/esm/config/platforms/evolution/product-config/index.d.ts +1 -0
- package/dist/esm/config/platforms/evolution/product-config/index.js +1 -0
- package/dist/esm/config/platforms/evolution/products.js +15 -8
- package/dist/esm/config/utils/index.d.ts +1 -0
- package/dist/esm/config/utils/index.js +1 -0
- package/dist/esm/config/utils/notebooks.d.ts +10 -0
- package/dist/esm/config/utils/notebooks.js +21 -0
- package/package.json +2 -2
- package/src/config/platforms/evolution/catalog.tsx +1 -1
- package/src/config/platforms/evolution/constants.ts +1 -0
- package/src/config/platforms/evolution/product-config/EvolutionNotebooks.ts +118 -0
- package/src/config/platforms/evolution/product-config/index.ts +1 -0
- package/src/config/platforms/evolution/products.ts +15 -6
- package/src/config/utils/index.ts +1 -0
- package/src/config/utils/notebooks.ts +32 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 0.36.0 (2025-12-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **AICNTB-2466:** evo notebooks calculator ([1aa1ffd](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/1aa1ffdf55e4f392ab5d3c35b33cb6e7c7c37530))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.35.7 (2025-12-12)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -88,7 +88,7 @@ exports.EVOLUTION_CATALOG = {
|
|
|
88
88
|
id: constants_1.CATEGORY.ML,
|
|
89
89
|
label: 'ML/AI Инструменты',
|
|
90
90
|
dataTestId: 'ml',
|
|
91
|
-
visibleProducts: [constants_2.EVOLUTION_PRODUCT.EvolutionMlInference],
|
|
91
|
+
visibleProducts: [constants_2.EVOLUTION_PRODUCT.EvolutionMlInference, constants_2.EVOLUTION_PRODUCT.EvolutionNotebooks],
|
|
92
92
|
},
|
|
93
93
|
],
|
|
94
94
|
};
|
|
@@ -21,6 +21,7 @@ export declare const EVOLUTION_PRODUCT: {
|
|
|
21
21
|
readonly EvolutionManagedRedis: "evolutionManagedRedis";
|
|
22
22
|
readonly EvolutionManagedSpark: "evolutionManagedSpark";
|
|
23
23
|
readonly EvolutionLoadBalancer: "evolutionLoadBalancer";
|
|
24
|
+
readonly EvolutionNotebooks: "evolutionNotebooks";
|
|
24
25
|
};
|
|
25
26
|
export declare const guaranteedPartToVCpuMap: {
|
|
26
27
|
[x: string]: number[];
|
|
@@ -24,6 +24,7 @@ exports.EVOLUTION_PRODUCT = {
|
|
|
24
24
|
EvolutionManagedRedis: 'evolutionManagedRedis',
|
|
25
25
|
EvolutionManagedSpark: 'evolutionManagedSpark',
|
|
26
26
|
EvolutionLoadBalancer: 'evolutionLoadBalancer',
|
|
27
|
+
EvolutionNotebooks: 'evolutionNotebooks',
|
|
27
28
|
};
|
|
28
29
|
const GuaranteedPartItem = {
|
|
29
30
|
'10': '10',
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EVOLUTION_NOTEBOOKS_CONFIG = void 0;
|
|
4
|
+
const components_1 = require("../../../../components");
|
|
5
|
+
const constants_1 = require("../../../../constants");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const DEFAULT_CONFIG_PARAMS = (0, utils_1.getDefaultNotebooksConfigParams)();
|
|
8
|
+
const configItems = [
|
|
9
|
+
{ value: 'ncpu.medium.4', label: '1 vCPU, 4 ГБ RAM' },
|
|
10
|
+
{ value: 'ncpu.large.4', label: '2 vCPU, 8 ГБ RAM' },
|
|
11
|
+
{ value: 'ncpu.xlarge.4', label: '4 vCPU, 16 ГБ RAM' },
|
|
12
|
+
{ value: 'ncpu.2xlarge.4', label: '8 vCPU, 32 ГБ RAM' },
|
|
13
|
+
{ value: 'nv100.xlarge.16', label: '1 V100 GPU, 3 vCPU, 63 ГБ RAM' },
|
|
14
|
+
];
|
|
15
|
+
exports.EVOLUTION_NOTEBOOKS_CONFIG = {
|
|
16
|
+
ui: [['config'], ['workingHours', 'workingHoursSpecification']],
|
|
17
|
+
controls: {
|
|
18
|
+
config: {
|
|
19
|
+
type: components_1.CONTROL.SelectSingle,
|
|
20
|
+
accessorKey: 'config',
|
|
21
|
+
items: configItems,
|
|
22
|
+
defaultValue: utils_1.DEFAULT_NOTEBOOKS_CONFIG_VALUE,
|
|
23
|
+
decoratorProps: { label: 'Конфигурация' },
|
|
24
|
+
onChangeFn: (value, setValue) => {
|
|
25
|
+
const params = (0, utils_1.getNotebookConfigParamsByInstance)(value);
|
|
26
|
+
if (!params) {
|
|
27
|
+
setValue([['config', value]]);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
setValue([
|
|
31
|
+
['config', value],
|
|
32
|
+
['vCpuCoreCount', params.vCpuCoreCount],
|
|
33
|
+
['ramAmount', params.ramAmount],
|
|
34
|
+
['hasGpu', params.hasGpu],
|
|
35
|
+
['gpuCount', params.gpuCount],
|
|
36
|
+
['gpuModel', params.gpuModel],
|
|
37
|
+
]);
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
vCpuCoreCount: {
|
|
41
|
+
type: components_1.CONTROL.Stepper,
|
|
42
|
+
accessorKey: 'vCpuCoreCount',
|
|
43
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.vCpuCoreCount,
|
|
44
|
+
uiProps: { visible: false, min: 0 },
|
|
45
|
+
decoratorProps: { label: 'vCPU cores' },
|
|
46
|
+
},
|
|
47
|
+
ramAmount: {
|
|
48
|
+
type: components_1.CONTROL.Stepper,
|
|
49
|
+
accessorKey: 'ramAmount',
|
|
50
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.ramAmount,
|
|
51
|
+
uiProps: { visible: false, min: 0 },
|
|
52
|
+
decoratorProps: { label: 'RAM (GiB)' },
|
|
53
|
+
},
|
|
54
|
+
hasGpu: {
|
|
55
|
+
type: components_1.CONTROL.Toggle,
|
|
56
|
+
accessorKey: 'hasGpu',
|
|
57
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.hasGpu,
|
|
58
|
+
uiProps: { visible: false },
|
|
59
|
+
decoratorProps: { label: 'GPU' },
|
|
60
|
+
},
|
|
61
|
+
gpuCount: {
|
|
62
|
+
type: components_1.CONTROL.Stepper,
|
|
63
|
+
accessorKey: 'gpuCount',
|
|
64
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.gpuCount,
|
|
65
|
+
uiProps: { visible: false, min: 0 },
|
|
66
|
+
decoratorProps: { label: 'GPU count' },
|
|
67
|
+
},
|
|
68
|
+
gpuModel: {
|
|
69
|
+
type: components_1.CONTROL.SelectSingle,
|
|
70
|
+
accessorKey: 'gpuModel',
|
|
71
|
+
items: [{ value: 'V100', label: 'V100' }],
|
|
72
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.gpuModel,
|
|
73
|
+
uiProps: { visible: false },
|
|
74
|
+
decoratorProps: { label: 'GPU model' },
|
|
75
|
+
},
|
|
76
|
+
workingHours: {
|
|
77
|
+
type: components_1.CONTROL.Stepper,
|
|
78
|
+
accessorKey: 'workingHours',
|
|
79
|
+
defaultValue: 1,
|
|
80
|
+
uiProps: { min: 1 },
|
|
81
|
+
decoratorProps: { label: 'Время работы' },
|
|
82
|
+
watchedControls: { period: 'workingHoursSpecification' },
|
|
83
|
+
relateFn: ({ period }) => {
|
|
84
|
+
const maxWorkingAmount = (0, utils_1.getMaxWorkingHoursAmount)(period, {
|
|
85
|
+
hour: 24,
|
|
86
|
+
day: 31,
|
|
87
|
+
month: 12,
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
uiProps: {
|
|
91
|
+
max: maxWorkingAmount,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
workingHoursSpecification: {
|
|
97
|
+
type: components_1.CONTROL.SelectSingle,
|
|
98
|
+
accessorKey: 'workingHoursSpecification',
|
|
99
|
+
defaultValue: constants_1.WorkingHoursSpecification.Hour,
|
|
100
|
+
items: constants_1.WORKING_HOURS_ITEMS,
|
|
101
|
+
uiProps: { showClearButton: false, searchable: false },
|
|
102
|
+
decoratorProps: { label: 'Период' },
|
|
103
|
+
onChangePeriod: (period, setValue) => {
|
|
104
|
+
setValue([['workingHoursSpecification', period]]);
|
|
105
|
+
},
|
|
106
|
+
canChangeWholePricePeriod: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
@@ -8,6 +8,7 @@ export * from './EvolutionStorageS3FreeTier';
|
|
|
8
8
|
export * from './EvolutionCloudServerGpu';
|
|
9
9
|
export * from './EvolutionContainerApps';
|
|
10
10
|
export * from './EvolutionContainerAppsFreeTier';
|
|
11
|
+
export * from './EvolutionNotebooks';
|
|
11
12
|
export * from './EvolutionArenadataDb';
|
|
12
13
|
export * from './EvolutionMlInference';
|
|
13
14
|
export * from './EvolutionSnatGateway';
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./EvolutionStorageS3FreeTier"), exports);
|
|
|
24
24
|
__exportStar(require("./EvolutionCloudServerGpu"), exports);
|
|
25
25
|
__exportStar(require("./EvolutionContainerApps"), exports);
|
|
26
26
|
__exportStar(require("./EvolutionContainerAppsFreeTier"), exports);
|
|
27
|
+
__exportStar(require("./EvolutionNotebooks"), exports);
|
|
27
28
|
__exportStar(require("./EvolutionArenadataDb"), exports);
|
|
28
29
|
__exportStar(require("./EvolutionMlInference"), exports);
|
|
29
30
|
__exportStar(require("./EvolutionSnatGateway"), exports);
|
|
@@ -158,9 +158,7 @@ exports.EVOLUTION_PRODUCTS = {
|
|
|
158
158
|
formConfig: product_config_1.EVOLUTION_CONTAINER_APPS_CONFIG,
|
|
159
159
|
dataTestId: constants_2.EVOLUTION_PRODUCT.EvolutionContainerApps,
|
|
160
160
|
enableChangeProductQuantity: true,
|
|
161
|
-
productQuantityValues: {
|
|
162
|
-
max: 5,
|
|
163
|
-
},
|
|
161
|
+
productQuantityValues: { max: 5 },
|
|
164
162
|
enableConnectToConsole: true,
|
|
165
163
|
},
|
|
166
164
|
[constants_2.EVOLUTION_PRODUCT.EvolutionContainerAppsFreeTier]: {
|
|
@@ -186,9 +184,7 @@ exports.EVOLUTION_PRODUCTS = {
|
|
|
186
184
|
dataTestId: constants_2.EVOLUTION_PRODUCT.EvolutionArenadataDb,
|
|
187
185
|
enableChangeProductQuantity: true,
|
|
188
186
|
enableConnectToConsole: false,
|
|
189
|
-
productQuantityValues: {
|
|
190
|
-
max: 3,
|
|
191
|
-
},
|
|
187
|
+
productQuantityValues: { max: 3 },
|
|
192
188
|
},
|
|
193
189
|
[constants_2.EVOLUTION_PRODUCT.EvolutionMlInference]: {
|
|
194
190
|
id: constants_2.EVOLUTION_PRODUCT.EvolutionMlInference,
|
|
@@ -256,4 +252,15 @@ exports.EVOLUTION_PRODUCTS = {
|
|
|
256
252
|
enableChangeProductQuantity: false,
|
|
257
253
|
enableConnectToConsole: true,
|
|
258
254
|
},
|
|
255
|
+
[constants_2.EVOLUTION_PRODUCT.EvolutionNotebooks]: {
|
|
256
|
+
id: constants_2.EVOLUTION_PRODUCT.EvolutionNotebooks,
|
|
257
|
+
platform: constants_1.PLATFORM.Evolution,
|
|
258
|
+
label: 'Evolution Notebooks',
|
|
259
|
+
caption: 'Интерактивная разработка ML-моделей в облаке в готовом окружении',
|
|
260
|
+
icon: uikit_product_icons_1.JupyterServersSVG,
|
|
261
|
+
formConfig: product_config_1.EVOLUTION_NOTEBOOKS_CONFIG,
|
|
262
|
+
dataTestId: constants_2.EVOLUTION_PRODUCT.EvolutionNotebooks,
|
|
263
|
+
enableChangeProductQuantity: true,
|
|
264
|
+
enableConnectToConsole: true,
|
|
265
|
+
},
|
|
259
266
|
};
|
|
@@ -18,6 +18,7 @@ export declare function generateBaseItems(arr: (string | number)[], labelReplace
|
|
|
18
18
|
export * from './disk';
|
|
19
19
|
export * from './eip';
|
|
20
20
|
export * from './obs';
|
|
21
|
+
export * from './notebooks';
|
|
21
22
|
export declare const getNumeralWord: (value: number, words: string[]) => string;
|
|
22
23
|
export declare const getMaxWorkingHoursAmount: (period: WorkingHoursSpecification, maxHours: {
|
|
23
24
|
hour: number;
|
|
@@ -38,6 +38,7 @@ function generateBaseItems(arr, labelReplacerFn) {
|
|
|
38
38
|
__exportStar(require("./disk"), exports);
|
|
39
39
|
__exportStar(require("./eip"), exports);
|
|
40
40
|
__exportStar(require("./obs"), exports);
|
|
41
|
+
__exportStar(require("./notebooks"), exports);
|
|
41
42
|
const getNumeralWord = (value, words) => {
|
|
42
43
|
const newValue = Math.abs(value) % 100;
|
|
43
44
|
const num = value % 10;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type NotebookConfigParams = {
|
|
2
|
+
vCpuCoreCount: number;
|
|
3
|
+
ramAmount: number;
|
|
4
|
+
hasGpu: boolean;
|
|
5
|
+
gpuCount: number;
|
|
6
|
+
gpuModel?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const DEFAULT_NOTEBOOKS_CONFIG_VALUE = "ncpu.medium.4";
|
|
9
|
+
export declare function getNotebookConfigParamsByInstance(config: string): NotebookConfigParams;
|
|
10
|
+
export declare function getDefaultNotebooksConfigParams(): NotebookConfigParams;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_NOTEBOOKS_CONFIG_VALUE = void 0;
|
|
4
|
+
exports.getNotebookConfigParamsByInstance = getNotebookConfigParamsByInstance;
|
|
5
|
+
exports.getDefaultNotebooksConfigParams = getDefaultNotebooksConfigParams;
|
|
6
|
+
exports.DEFAULT_NOTEBOOKS_CONFIG_VALUE = 'ncpu.medium.4';
|
|
7
|
+
function getNotebookConfigParamsByInstance(config) {
|
|
8
|
+
switch (config) {
|
|
9
|
+
case 'ncpu.medium.4':
|
|
10
|
+
return { vCpuCoreCount: 1, ramAmount: 4, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
11
|
+
case 'ncpu.large.4':
|
|
12
|
+
return { vCpuCoreCount: 2, ramAmount: 8, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
13
|
+
case 'ncpu.xlarge.4':
|
|
14
|
+
return { vCpuCoreCount: 4, ramAmount: 16, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
15
|
+
case 'ncpu.2xlarge.4':
|
|
16
|
+
return { vCpuCoreCount: 8, ramAmount: 32, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
17
|
+
case 'nv100.xlarge.16':
|
|
18
|
+
return { vCpuCoreCount: 3, ramAmount: 63, hasGpu: true, gpuCount: 1, gpuModel: 'V100' };
|
|
19
|
+
default:
|
|
20
|
+
return { vCpuCoreCount: 1, ramAmount: 4, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function getDefaultNotebooksConfigParams() {
|
|
24
|
+
const params = getNotebookConfigParamsByInstance(exports.DEFAULT_NOTEBOOKS_CONFIG_VALUE);
|
|
25
|
+
return params;
|
|
26
|
+
}
|
|
@@ -85,7 +85,7 @@ export const EVOLUTION_CATALOG = {
|
|
|
85
85
|
id: CATEGORY.ML,
|
|
86
86
|
label: 'ML/AI Инструменты',
|
|
87
87
|
dataTestId: 'ml',
|
|
88
|
-
visibleProducts: [EVOLUTION_PRODUCT.EvolutionMlInference],
|
|
88
|
+
visibleProducts: [EVOLUTION_PRODUCT.EvolutionMlInference, EVOLUTION_PRODUCT.EvolutionNotebooks],
|
|
89
89
|
},
|
|
90
90
|
],
|
|
91
91
|
};
|
|
@@ -21,6 +21,7 @@ export declare const EVOLUTION_PRODUCT: {
|
|
|
21
21
|
readonly EvolutionManagedRedis: "evolutionManagedRedis";
|
|
22
22
|
readonly EvolutionManagedSpark: "evolutionManagedSpark";
|
|
23
23
|
readonly EvolutionLoadBalancer: "evolutionLoadBalancer";
|
|
24
|
+
readonly EvolutionNotebooks: "evolutionNotebooks";
|
|
24
25
|
};
|
|
25
26
|
export declare const guaranteedPartToVCpuMap: {
|
|
26
27
|
[x: string]: number[];
|
|
@@ -21,6 +21,7 @@ export const EVOLUTION_PRODUCT = {
|
|
|
21
21
|
EvolutionManagedRedis: 'evolutionManagedRedis',
|
|
22
22
|
EvolutionManagedSpark: 'evolutionManagedSpark',
|
|
23
23
|
EvolutionLoadBalancer: 'evolutionLoadBalancer',
|
|
24
|
+
EvolutionNotebooks: 'evolutionNotebooks',
|
|
24
25
|
};
|
|
25
26
|
const GuaranteedPartItem = {
|
|
26
27
|
'10': '10',
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { CONTROL } from '../../../../components';
|
|
2
|
+
import { WORKING_HOURS_ITEMS, WorkingHoursSpecification } from '../../../../constants';
|
|
3
|
+
import { DEFAULT_NOTEBOOKS_CONFIG_VALUE, getDefaultNotebooksConfigParams, getMaxWorkingHoursAmount, getNotebookConfigParamsByInstance, } from '../../../utils';
|
|
4
|
+
const DEFAULT_CONFIG_PARAMS = getDefaultNotebooksConfigParams();
|
|
5
|
+
const configItems = [
|
|
6
|
+
{ value: 'ncpu.medium.4', label: '1 vCPU, 4 ГБ RAM' },
|
|
7
|
+
{ value: 'ncpu.large.4', label: '2 vCPU, 8 ГБ RAM' },
|
|
8
|
+
{ value: 'ncpu.xlarge.4', label: '4 vCPU, 16 ГБ RAM' },
|
|
9
|
+
{ value: 'ncpu.2xlarge.4', label: '8 vCPU, 32 ГБ RAM' },
|
|
10
|
+
{ value: 'nv100.xlarge.16', label: '1 V100 GPU, 3 vCPU, 63 ГБ RAM' },
|
|
11
|
+
];
|
|
12
|
+
export const EVOLUTION_NOTEBOOKS_CONFIG = {
|
|
13
|
+
ui: [['config'], ['workingHours', 'workingHoursSpecification']],
|
|
14
|
+
controls: {
|
|
15
|
+
config: {
|
|
16
|
+
type: CONTROL.SelectSingle,
|
|
17
|
+
accessorKey: 'config',
|
|
18
|
+
items: configItems,
|
|
19
|
+
defaultValue: DEFAULT_NOTEBOOKS_CONFIG_VALUE,
|
|
20
|
+
decoratorProps: { label: 'Конфигурация' },
|
|
21
|
+
onChangeFn: (value, setValue) => {
|
|
22
|
+
const params = getNotebookConfigParamsByInstance(value);
|
|
23
|
+
if (!params) {
|
|
24
|
+
setValue([['config', value]]);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
setValue([
|
|
28
|
+
['config', value],
|
|
29
|
+
['vCpuCoreCount', params.vCpuCoreCount],
|
|
30
|
+
['ramAmount', params.ramAmount],
|
|
31
|
+
['hasGpu', params.hasGpu],
|
|
32
|
+
['gpuCount', params.gpuCount],
|
|
33
|
+
['gpuModel', params.gpuModel],
|
|
34
|
+
]);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
vCpuCoreCount: {
|
|
38
|
+
type: CONTROL.Stepper,
|
|
39
|
+
accessorKey: 'vCpuCoreCount',
|
|
40
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.vCpuCoreCount,
|
|
41
|
+
uiProps: { visible: false, min: 0 },
|
|
42
|
+
decoratorProps: { label: 'vCPU cores' },
|
|
43
|
+
},
|
|
44
|
+
ramAmount: {
|
|
45
|
+
type: CONTROL.Stepper,
|
|
46
|
+
accessorKey: 'ramAmount',
|
|
47
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.ramAmount,
|
|
48
|
+
uiProps: { visible: false, min: 0 },
|
|
49
|
+
decoratorProps: { label: 'RAM (GiB)' },
|
|
50
|
+
},
|
|
51
|
+
hasGpu: {
|
|
52
|
+
type: CONTROL.Toggle,
|
|
53
|
+
accessorKey: 'hasGpu',
|
|
54
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.hasGpu,
|
|
55
|
+
uiProps: { visible: false },
|
|
56
|
+
decoratorProps: { label: 'GPU' },
|
|
57
|
+
},
|
|
58
|
+
gpuCount: {
|
|
59
|
+
type: CONTROL.Stepper,
|
|
60
|
+
accessorKey: 'gpuCount',
|
|
61
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.gpuCount,
|
|
62
|
+
uiProps: { visible: false, min: 0 },
|
|
63
|
+
decoratorProps: { label: 'GPU count' },
|
|
64
|
+
},
|
|
65
|
+
gpuModel: {
|
|
66
|
+
type: CONTROL.SelectSingle,
|
|
67
|
+
accessorKey: 'gpuModel',
|
|
68
|
+
items: [{ value: 'V100', label: 'V100' }],
|
|
69
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.gpuModel,
|
|
70
|
+
uiProps: { visible: false },
|
|
71
|
+
decoratorProps: { label: 'GPU model' },
|
|
72
|
+
},
|
|
73
|
+
workingHours: {
|
|
74
|
+
type: CONTROL.Stepper,
|
|
75
|
+
accessorKey: 'workingHours',
|
|
76
|
+
defaultValue: 1,
|
|
77
|
+
uiProps: { min: 1 },
|
|
78
|
+
decoratorProps: { label: 'Время работы' },
|
|
79
|
+
watchedControls: { period: 'workingHoursSpecification' },
|
|
80
|
+
relateFn: ({ period }) => {
|
|
81
|
+
const maxWorkingAmount = getMaxWorkingHoursAmount(period, {
|
|
82
|
+
hour: 24,
|
|
83
|
+
day: 31,
|
|
84
|
+
month: 12,
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
uiProps: {
|
|
88
|
+
max: maxWorkingAmount,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
workingHoursSpecification: {
|
|
94
|
+
type: CONTROL.SelectSingle,
|
|
95
|
+
accessorKey: 'workingHoursSpecification',
|
|
96
|
+
defaultValue: WorkingHoursSpecification.Hour,
|
|
97
|
+
items: WORKING_HOURS_ITEMS,
|
|
98
|
+
uiProps: { showClearButton: false, searchable: false },
|
|
99
|
+
decoratorProps: { label: 'Период' },
|
|
100
|
+
onChangePeriod: (period, setValue) => {
|
|
101
|
+
setValue([['workingHoursSpecification', period]]);
|
|
102
|
+
},
|
|
103
|
+
canChangeWholePricePeriod: true,
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
};
|
|
@@ -8,6 +8,7 @@ export * from './EvolutionStorageS3FreeTier';
|
|
|
8
8
|
export * from './EvolutionCloudServerGpu';
|
|
9
9
|
export * from './EvolutionContainerApps';
|
|
10
10
|
export * from './EvolutionContainerAppsFreeTier';
|
|
11
|
+
export * from './EvolutionNotebooks';
|
|
11
12
|
export * from './EvolutionArenadataDb';
|
|
12
13
|
export * from './EvolutionMlInference';
|
|
13
14
|
export * from './EvolutionSnatGateway';
|
|
@@ -8,6 +8,7 @@ export * from './EvolutionStorageS3FreeTier';
|
|
|
8
8
|
export * from './EvolutionCloudServerGpu';
|
|
9
9
|
export * from './EvolutionContainerApps';
|
|
10
10
|
export * from './EvolutionContainerAppsFreeTier';
|
|
11
|
+
export * from './EvolutionNotebooks';
|
|
11
12
|
export * from './EvolutionArenadataDb';
|
|
12
13
|
export * from './EvolutionMlInference';
|
|
13
14
|
export * from './EvolutionSnatGateway';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ArenadataDbSVG, ArtifactRegistrySVG, BareMetalSVG, ContainerAppsSVG, ElasticCloudServerWithGpuSVG, EvoDnsSVG, EvolutionBiSVG, EvolutionComputeSVG, LoadBalancerSVG, ManagedKubernetesSVG, ManagedPostgreSqlSVG, MetastoreSVG, MlInferenceSVG, PublicIpSVG, RedisSVG, S3StorageSVG, SnatSVG, SparkSVG, TrinoSVG, } from '@cloud-ru/uikit-product-icons';
|
|
1
|
+
import { ArenadataDbSVG, ArtifactRegistrySVG, BareMetalSVG, ContainerAppsSVG, ElasticCloudServerWithGpuSVG, EvoDnsSVG, EvolutionBiSVG, EvolutionComputeSVG, JupyterServersSVG, LoadBalancerSVG, ManagedKubernetesSVG, ManagedPostgreSqlSVG, MetastoreSVG, MlInferenceSVG, PublicIpSVG, RedisSVG, S3StorageSVG, SnatSVG, SparkSVG, TrinoSVG, } from '@cloud-ru/uikit-product-icons';
|
|
2
2
|
import { PLATFORM } from '../../../constants';
|
|
3
3
|
import { EVOLUTION_PRODUCT } from './constants';
|
|
4
|
-
import { EVOLUTION_ARENADATA_DB_FORM_CONFIG, EVOLUTION_ARTIFACT_REGISTRY, EVOLUTION_BARE_METAL_FORM_CONFIG, EVOLUTION_CLOUD_SERVER_FORM_CONFIG, EVOLUTION_CLOUD_SERVER_FREE_TIER_FORM_CONFIG, EVOLUTION_CLOUD_SERVER_GPU_FORM_CONFIG, EVOLUTION_CONTAINER_APPS_CONFIG, EVOLUTION_CONTAINER_APPS_FREE_TIER_CONFIG, EVOLUTION_KUBERNETES_FORM_CONFIG, EVOLUTION_MANAGED_METASTORE_CONFIG, EVOLUTION_MANAGED_TRINO_CONFIG, EVOLUTION_ML_INFERENCE_FORM_CONFIG, EVOLUTION_POSTGRE_SQL_FORM_CONFIG, EVOLUTION_PUBLIC_IP_FORM_CONFIG, EVOLUTION_SNAT_GATEWAY_FORM_CONFIG, EVOLUTION_STORAGE_S3_FORM_CONFIG, EVOLUTION_STORAGE_S3_FREE_TIER_FORM_CONFIG, } from './product-config';
|
|
4
|
+
import { EVOLUTION_ARENADATA_DB_FORM_CONFIG, EVOLUTION_ARTIFACT_REGISTRY, EVOLUTION_BARE_METAL_FORM_CONFIG, EVOLUTION_CLOUD_SERVER_FORM_CONFIG, EVOLUTION_CLOUD_SERVER_FREE_TIER_FORM_CONFIG, EVOLUTION_CLOUD_SERVER_GPU_FORM_CONFIG, EVOLUTION_CONTAINER_APPS_CONFIG, EVOLUTION_CONTAINER_APPS_FREE_TIER_CONFIG, EVOLUTION_KUBERNETES_FORM_CONFIG, EVOLUTION_MANAGED_METASTORE_CONFIG, EVOLUTION_MANAGED_TRINO_CONFIG, EVOLUTION_ML_INFERENCE_FORM_CONFIG, EVOLUTION_NOTEBOOKS_CONFIG, EVOLUTION_POSTGRE_SQL_FORM_CONFIG, EVOLUTION_PUBLIC_IP_FORM_CONFIG, EVOLUTION_SNAT_GATEWAY_FORM_CONFIG, EVOLUTION_STORAGE_S3_FORM_CONFIG, EVOLUTION_STORAGE_S3_FREE_TIER_FORM_CONFIG, } from './product-config';
|
|
5
5
|
import { EVOLUTION_DNS_CONFIG } from './product-config/EvolutionDNS';
|
|
6
6
|
import { EVOLUTION_LOAD_BALANCER_CONFIG } from './product-config/EvolutionLoadBalancer';
|
|
7
7
|
import { EVOLUTION_MANAGED_BI } from './product-config/EvolutionManagedBI';
|
|
@@ -155,9 +155,7 @@ export const EVOLUTION_PRODUCTS = {
|
|
|
155
155
|
formConfig: EVOLUTION_CONTAINER_APPS_CONFIG,
|
|
156
156
|
dataTestId: EVOLUTION_PRODUCT.EvolutionContainerApps,
|
|
157
157
|
enableChangeProductQuantity: true,
|
|
158
|
-
productQuantityValues: {
|
|
159
|
-
max: 5,
|
|
160
|
-
},
|
|
158
|
+
productQuantityValues: { max: 5 },
|
|
161
159
|
enableConnectToConsole: true,
|
|
162
160
|
},
|
|
163
161
|
[EVOLUTION_PRODUCT.EvolutionContainerAppsFreeTier]: {
|
|
@@ -183,9 +181,7 @@ export const EVOLUTION_PRODUCTS = {
|
|
|
183
181
|
dataTestId: EVOLUTION_PRODUCT.EvolutionArenadataDb,
|
|
184
182
|
enableChangeProductQuantity: true,
|
|
185
183
|
enableConnectToConsole: false,
|
|
186
|
-
productQuantityValues: {
|
|
187
|
-
max: 3,
|
|
188
|
-
},
|
|
184
|
+
productQuantityValues: { max: 3 },
|
|
189
185
|
},
|
|
190
186
|
[EVOLUTION_PRODUCT.EvolutionMlInference]: {
|
|
191
187
|
id: EVOLUTION_PRODUCT.EvolutionMlInference,
|
|
@@ -253,4 +249,15 @@ export const EVOLUTION_PRODUCTS = {
|
|
|
253
249
|
enableChangeProductQuantity: false,
|
|
254
250
|
enableConnectToConsole: true,
|
|
255
251
|
},
|
|
252
|
+
[EVOLUTION_PRODUCT.EvolutionNotebooks]: {
|
|
253
|
+
id: EVOLUTION_PRODUCT.EvolutionNotebooks,
|
|
254
|
+
platform: PLATFORM.Evolution,
|
|
255
|
+
label: 'Evolution Notebooks',
|
|
256
|
+
caption: 'Интерактивная разработка ML-моделей в облаке в готовом окружении',
|
|
257
|
+
icon: JupyterServersSVG,
|
|
258
|
+
formConfig: EVOLUTION_NOTEBOOKS_CONFIG,
|
|
259
|
+
dataTestId: EVOLUTION_PRODUCT.EvolutionNotebooks,
|
|
260
|
+
enableChangeProductQuantity: true,
|
|
261
|
+
enableConnectToConsole: true,
|
|
262
|
+
},
|
|
256
263
|
};
|
|
@@ -18,6 +18,7 @@ export declare function generateBaseItems(arr: (string | number)[], labelReplace
|
|
|
18
18
|
export * from './disk';
|
|
19
19
|
export * from './eip';
|
|
20
20
|
export * from './obs';
|
|
21
|
+
export * from './notebooks';
|
|
21
22
|
export declare const getNumeralWord: (value: number, words: string[]) => string;
|
|
22
23
|
export declare const getMaxWorkingHoursAmount: (period: WorkingHoursSpecification, maxHours: {
|
|
23
24
|
hour: number;
|
|
@@ -17,6 +17,7 @@ export function generateBaseItems(arr, labelReplacerFn) {
|
|
|
17
17
|
export * from './disk';
|
|
18
18
|
export * from './eip';
|
|
19
19
|
export * from './obs';
|
|
20
|
+
export * from './notebooks';
|
|
20
21
|
export const getNumeralWord = (value, words) => {
|
|
21
22
|
const newValue = Math.abs(value) % 100;
|
|
22
23
|
const num = value % 10;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type NotebookConfigParams = {
|
|
2
|
+
vCpuCoreCount: number;
|
|
3
|
+
ramAmount: number;
|
|
4
|
+
hasGpu: boolean;
|
|
5
|
+
gpuCount: number;
|
|
6
|
+
gpuModel?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const DEFAULT_NOTEBOOKS_CONFIG_VALUE = "ncpu.medium.4";
|
|
9
|
+
export declare function getNotebookConfigParamsByInstance(config: string): NotebookConfigParams;
|
|
10
|
+
export declare function getDefaultNotebooksConfigParams(): NotebookConfigParams;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const DEFAULT_NOTEBOOKS_CONFIG_VALUE = 'ncpu.medium.4';
|
|
2
|
+
export function getNotebookConfigParamsByInstance(config) {
|
|
3
|
+
switch (config) {
|
|
4
|
+
case 'ncpu.medium.4':
|
|
5
|
+
return { vCpuCoreCount: 1, ramAmount: 4, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
6
|
+
case 'ncpu.large.4':
|
|
7
|
+
return { vCpuCoreCount: 2, ramAmount: 8, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
8
|
+
case 'ncpu.xlarge.4':
|
|
9
|
+
return { vCpuCoreCount: 4, ramAmount: 16, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
10
|
+
case 'ncpu.2xlarge.4':
|
|
11
|
+
return { vCpuCoreCount: 8, ramAmount: 32, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
12
|
+
case 'nv100.xlarge.16':
|
|
13
|
+
return { vCpuCoreCount: 3, ramAmount: 63, hasGpu: true, gpuCount: 1, gpuModel: 'V100' };
|
|
14
|
+
default:
|
|
15
|
+
return { vCpuCoreCount: 1, ramAmount: 4, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function getDefaultNotebooksConfigParams() {
|
|
19
|
+
const params = getNotebookConfigParamsByInstance(DEFAULT_NOTEBOOKS_CONFIG_VALUE);
|
|
20
|
+
return params;
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-calculator",
|
|
3
3
|
"title": "Calculator",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.36.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/lodash": "4.17.13"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "29aa7154f94a4734eb16738a99f858593cec9d92"
|
|
75
75
|
}
|
|
@@ -107,7 +107,7 @@ export const EVOLUTION_CATALOG: CatalogConfig['catalog'] = {
|
|
|
107
107
|
id: CATEGORY.ML,
|
|
108
108
|
label: 'ML/AI Инструменты',
|
|
109
109
|
dataTestId: 'ml',
|
|
110
|
-
visibleProducts: [EVOLUTION_PRODUCT.EvolutionMlInference],
|
|
110
|
+
visibleProducts: [EVOLUTION_PRODUCT.EvolutionMlInference, EVOLUTION_PRODUCT.EvolutionNotebooks],
|
|
111
111
|
},
|
|
112
112
|
],
|
|
113
113
|
};
|
|
@@ -21,6 +21,7 @@ export const EVOLUTION_PRODUCT = {
|
|
|
21
21
|
EvolutionManagedRedis: 'evolutionManagedRedis',
|
|
22
22
|
EvolutionManagedSpark: 'evolutionManagedSpark',
|
|
23
23
|
EvolutionLoadBalancer: 'evolutionLoadBalancer',
|
|
24
|
+
EvolutionNotebooks: 'evolutionNotebooks',
|
|
24
25
|
} as const;
|
|
25
26
|
|
|
26
27
|
const GuaranteedPartItem = {
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { CONTROL, FormConfig } from '../../../../components';
|
|
2
|
+
import { WORKING_HOURS_ITEMS, WorkingHoursSpecification } from '../../../../constants';
|
|
3
|
+
import {
|
|
4
|
+
DEFAULT_NOTEBOOKS_CONFIG_VALUE,
|
|
5
|
+
getDefaultNotebooksConfigParams,
|
|
6
|
+
getMaxWorkingHoursAmount,
|
|
7
|
+
getNotebookConfigParamsByInstance,
|
|
8
|
+
} from '../../../utils';
|
|
9
|
+
|
|
10
|
+
const DEFAULT_CONFIG_PARAMS = getDefaultNotebooksConfigParams();
|
|
11
|
+
|
|
12
|
+
const configItems = [
|
|
13
|
+
{ value: 'ncpu.medium.4', label: '1 vCPU, 4 ГБ RAM' },
|
|
14
|
+
{ value: 'ncpu.large.4', label: '2 vCPU, 8 ГБ RAM' },
|
|
15
|
+
{ value: 'ncpu.xlarge.4', label: '4 vCPU, 16 ГБ RAM' },
|
|
16
|
+
{ value: 'ncpu.2xlarge.4', label: '8 vCPU, 32 ГБ RAM' },
|
|
17
|
+
{ value: 'nv100.xlarge.16', label: '1 V100 GPU, 3 vCPU, 63 ГБ RAM' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export const EVOLUTION_NOTEBOOKS_CONFIG: FormConfig = {
|
|
21
|
+
ui: [['config'], ['workingHours', 'workingHoursSpecification']],
|
|
22
|
+
controls: {
|
|
23
|
+
config: {
|
|
24
|
+
type: CONTROL.SelectSingle,
|
|
25
|
+
accessorKey: 'config',
|
|
26
|
+
items: configItems,
|
|
27
|
+
defaultValue: DEFAULT_NOTEBOOKS_CONFIG_VALUE,
|
|
28
|
+
decoratorProps: { label: 'Конфигурация' },
|
|
29
|
+
onChangeFn: (value, setValue) => {
|
|
30
|
+
const params = getNotebookConfigParamsByInstance(value);
|
|
31
|
+
|
|
32
|
+
if (!params) {
|
|
33
|
+
setValue([['config', value]]);
|
|
34
|
+
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setValue([
|
|
39
|
+
['config', value],
|
|
40
|
+
['vCpuCoreCount', params.vCpuCoreCount],
|
|
41
|
+
['ramAmount', params.ramAmount],
|
|
42
|
+
['hasGpu', params.hasGpu],
|
|
43
|
+
['gpuCount', params.gpuCount],
|
|
44
|
+
['gpuModel', params.gpuModel],
|
|
45
|
+
]);
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
vCpuCoreCount: {
|
|
49
|
+
type: CONTROL.Stepper,
|
|
50
|
+
accessorKey: 'vCpuCoreCount',
|
|
51
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.vCpuCoreCount,
|
|
52
|
+
uiProps: { visible: false, min: 0 },
|
|
53
|
+
decoratorProps: { label: 'vCPU cores' },
|
|
54
|
+
},
|
|
55
|
+
ramAmount: {
|
|
56
|
+
type: CONTROL.Stepper,
|
|
57
|
+
accessorKey: 'ramAmount',
|
|
58
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.ramAmount,
|
|
59
|
+
uiProps: { visible: false, min: 0 },
|
|
60
|
+
decoratorProps: { label: 'RAM (GiB)' },
|
|
61
|
+
},
|
|
62
|
+
hasGpu: {
|
|
63
|
+
type: CONTROL.Toggle,
|
|
64
|
+
accessorKey: 'hasGpu',
|
|
65
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.hasGpu,
|
|
66
|
+
uiProps: { visible: false },
|
|
67
|
+
decoratorProps: { label: 'GPU' },
|
|
68
|
+
},
|
|
69
|
+
gpuCount: {
|
|
70
|
+
type: CONTROL.Stepper,
|
|
71
|
+
accessorKey: 'gpuCount',
|
|
72
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.gpuCount,
|
|
73
|
+
uiProps: { visible: false, min: 0 },
|
|
74
|
+
decoratorProps: { label: 'GPU count' },
|
|
75
|
+
},
|
|
76
|
+
gpuModel: {
|
|
77
|
+
type: CONTROL.SelectSingle,
|
|
78
|
+
accessorKey: 'gpuModel',
|
|
79
|
+
items: [{ value: 'V100', label: 'V100' }],
|
|
80
|
+
defaultValue: DEFAULT_CONFIG_PARAMS.gpuModel,
|
|
81
|
+
uiProps: { visible: false },
|
|
82
|
+
decoratorProps: { label: 'GPU model' },
|
|
83
|
+
},
|
|
84
|
+
workingHours: {
|
|
85
|
+
type: CONTROL.Stepper,
|
|
86
|
+
accessorKey: 'workingHours',
|
|
87
|
+
defaultValue: 1,
|
|
88
|
+
uiProps: { min: 1 },
|
|
89
|
+
decoratorProps: { label: 'Время работы' },
|
|
90
|
+
watchedControls: { period: 'workingHoursSpecification' },
|
|
91
|
+
relateFn: ({ period }) => {
|
|
92
|
+
const maxWorkingAmount = getMaxWorkingHoursAmount(period, {
|
|
93
|
+
hour: 24,
|
|
94
|
+
day: 31,
|
|
95
|
+
month: 12,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
uiProps: {
|
|
100
|
+
max: maxWorkingAmount,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
workingHoursSpecification: {
|
|
106
|
+
type: CONTROL.SelectSingle,
|
|
107
|
+
accessorKey: 'workingHoursSpecification',
|
|
108
|
+
defaultValue: WorkingHoursSpecification.Hour,
|
|
109
|
+
items: WORKING_HOURS_ITEMS,
|
|
110
|
+
uiProps: { showClearButton: false, searchable: false },
|
|
111
|
+
decoratorProps: { label: 'Период' },
|
|
112
|
+
onChangePeriod: (period, setValue) => {
|
|
113
|
+
setValue([['workingHoursSpecification', period]]);
|
|
114
|
+
},
|
|
115
|
+
canChangeWholePricePeriod: true,
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
@@ -8,6 +8,7 @@ export * from './EvolutionStorageS3FreeTier';
|
|
|
8
8
|
export * from './EvolutionCloudServerGpu';
|
|
9
9
|
export * from './EvolutionContainerApps';
|
|
10
10
|
export * from './EvolutionContainerAppsFreeTier';
|
|
11
|
+
export * from './EvolutionNotebooks';
|
|
11
12
|
export * from './EvolutionArenadataDb';
|
|
12
13
|
export * from './EvolutionMlInference';
|
|
13
14
|
export * from './EvolutionSnatGateway';
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
EvoDnsSVG,
|
|
8
8
|
EvolutionBiSVG,
|
|
9
9
|
EvolutionComputeSVG,
|
|
10
|
+
JupyterServersSVG,
|
|
10
11
|
LoadBalancerSVG,
|
|
11
12
|
ManagedKubernetesSVG,
|
|
12
13
|
ManagedPostgreSqlSVG,
|
|
@@ -36,6 +37,7 @@ import {
|
|
|
36
37
|
EVOLUTION_MANAGED_METASTORE_CONFIG,
|
|
37
38
|
EVOLUTION_MANAGED_TRINO_CONFIG,
|
|
38
39
|
EVOLUTION_ML_INFERENCE_FORM_CONFIG,
|
|
40
|
+
EVOLUTION_NOTEBOOKS_CONFIG,
|
|
39
41
|
EVOLUTION_POSTGRE_SQL_FORM_CONFIG,
|
|
40
42
|
EVOLUTION_PUBLIC_IP_FORM_CONFIG,
|
|
41
43
|
EVOLUTION_SNAT_GATEWAY_FORM_CONFIG,
|
|
@@ -196,9 +198,7 @@ export const EVOLUTION_PRODUCTS: CatalogConfig['products'] = {
|
|
|
196
198
|
formConfig: EVOLUTION_CONTAINER_APPS_CONFIG,
|
|
197
199
|
dataTestId: EVOLUTION_PRODUCT.EvolutionContainerApps,
|
|
198
200
|
enableChangeProductQuantity: true,
|
|
199
|
-
productQuantityValues: {
|
|
200
|
-
max: 5,
|
|
201
|
-
},
|
|
201
|
+
productQuantityValues: { max: 5 },
|
|
202
202
|
enableConnectToConsole: true,
|
|
203
203
|
},
|
|
204
204
|
[EVOLUTION_PRODUCT.EvolutionContainerAppsFreeTier]: {
|
|
@@ -224,9 +224,7 @@ export const EVOLUTION_PRODUCTS: CatalogConfig['products'] = {
|
|
|
224
224
|
dataTestId: EVOLUTION_PRODUCT.EvolutionArenadataDb,
|
|
225
225
|
enableChangeProductQuantity: true,
|
|
226
226
|
enableConnectToConsole: false,
|
|
227
|
-
productQuantityValues: {
|
|
228
|
-
max: 3,
|
|
229
|
-
},
|
|
227
|
+
productQuantityValues: { max: 3 },
|
|
230
228
|
},
|
|
231
229
|
[EVOLUTION_PRODUCT.EvolutionMlInference]: {
|
|
232
230
|
id: EVOLUTION_PRODUCT.EvolutionMlInference,
|
|
@@ -295,4 +293,15 @@ export const EVOLUTION_PRODUCTS: CatalogConfig['products'] = {
|
|
|
295
293
|
enableChangeProductQuantity: false,
|
|
296
294
|
enableConnectToConsole: true,
|
|
297
295
|
},
|
|
296
|
+
[EVOLUTION_PRODUCT.EvolutionNotebooks]: {
|
|
297
|
+
id: EVOLUTION_PRODUCT.EvolutionNotebooks,
|
|
298
|
+
platform: PLATFORM.Evolution,
|
|
299
|
+
label: 'Evolution Notebooks',
|
|
300
|
+
caption: 'Интерактивная разработка ML-моделей в облаке в готовом окружении',
|
|
301
|
+
icon: JupyterServersSVG,
|
|
302
|
+
formConfig: EVOLUTION_NOTEBOOKS_CONFIG,
|
|
303
|
+
dataTestId: EVOLUTION_PRODUCT.EvolutionNotebooks,
|
|
304
|
+
enableChangeProductQuantity: true,
|
|
305
|
+
enableConnectToConsole: true,
|
|
306
|
+
},
|
|
298
307
|
};
|
|
@@ -20,6 +20,7 @@ export function generateBaseItems(arr: (string | number)[], labelReplacerFn?: (v
|
|
|
20
20
|
export * from './disk';
|
|
21
21
|
export * from './eip';
|
|
22
22
|
export * from './obs';
|
|
23
|
+
export * from './notebooks';
|
|
23
24
|
|
|
24
25
|
export const getNumeralWord = (value: number, words: string[]) => {
|
|
25
26
|
const newValue = Math.abs(value) % 100;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type NotebookConfigParams = {
|
|
2
|
+
vCpuCoreCount: number;
|
|
3
|
+
ramAmount: number;
|
|
4
|
+
hasGpu: boolean;
|
|
5
|
+
gpuCount: number;
|
|
6
|
+
gpuModel?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_NOTEBOOKS_CONFIG_VALUE = 'ncpu.medium.4';
|
|
10
|
+
|
|
11
|
+
export function getNotebookConfigParamsByInstance(config: string): NotebookConfigParams {
|
|
12
|
+
switch (config) {
|
|
13
|
+
case 'ncpu.medium.4':
|
|
14
|
+
return { vCpuCoreCount: 1, ramAmount: 4, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
15
|
+
case 'ncpu.large.4':
|
|
16
|
+
return { vCpuCoreCount: 2, ramAmount: 8, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
17
|
+
case 'ncpu.xlarge.4':
|
|
18
|
+
return { vCpuCoreCount: 4, ramAmount: 16, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
19
|
+
case 'ncpu.2xlarge.4':
|
|
20
|
+
return { vCpuCoreCount: 8, ramAmount: 32, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
21
|
+
case 'nv100.xlarge.16':
|
|
22
|
+
return { vCpuCoreCount: 3, ramAmount: 63, hasGpu: true, gpuCount: 1, gpuModel: 'V100' };
|
|
23
|
+
default:
|
|
24
|
+
return { vCpuCoreCount: 1, ramAmount: 4, hasGpu: false, gpuCount: 0, gpuModel: undefined };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function getDefaultNotebooksConfigParams(): NotebookConfigParams {
|
|
29
|
+
const params = getNotebookConfigParamsByInstance(DEFAULT_NOTEBOOKS_CONFIG_VALUE);
|
|
30
|
+
|
|
31
|
+
return params;
|
|
32
|
+
}
|