diff --git a/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx b/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx index 30cb1e231a..a919049323 100644 --- a/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/NIMServiceModal/NIMPVCSizeSection.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { HelperText, HelperTextItem, StackItem } from '@patternfly/react-core'; import PVSizeField from '~/pages/projects/components/PVSizeField'; +import { MEMORY_UNITS_FOR_SELECTION } from '~/utilities/valueUnits'; type NIMPVCSizeSectionProps = { pvcSize: string; @@ -14,12 +15,16 @@ const NIMPVCSizeSection: React.FC = ({ pvcSize, setPvcSi size={pvcSize} setSize={(value: string) => setPvcSize(value)} label="NVIDIA NIM storage size" + options={MEMORY_UNITS_FOR_SELECTION.filter((option) => option.unit !== 'Mi')} // Filtering out 'Mi' /> Specify the size of the cluster storage instance that will be created to store the downloaded NVIDIA NIM. + + Make sure your storage size is greater than the NIM size specified by NVIDIA. + ); diff --git a/frontend/src/pages/projects/components/PVSizeField.tsx b/frontend/src/pages/projects/components/PVSizeField.tsx index 51e3136685..34c348fb2b 100644 --- a/frontend/src/pages/projects/components/PVSizeField.tsx +++ b/frontend/src/pages/projects/components/PVSizeField.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { FormGroup, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import ValueUnitField from '~/components/ValueUnitField'; -import { MEMORY_UNITS_FOR_SELECTION } from '~/utilities/valueUnits'; +import { MEMORY_UNITS_FOR_SELECTION, UnitOption } from '~/utilities/valueUnits'; type PVSizeFieldProps = { fieldID: string; @@ -11,6 +11,7 @@ type PVSizeFieldProps = { setSize: (size: string) => void; currentSize?: string; label?: string; + options?: UnitOption[]; }; const PVSizeField: React.FC = ({ @@ -20,6 +21,7 @@ const PVSizeField: React.FC = ({ setSize, currentSize, label = 'Persistent storage size', + options = MEMORY_UNITS_FOR_SELECTION, }) => ( = ({ menuAppendTo={menuAppendTo} onChange={(value) => setSize(value)} validated={currentSize ? 'warning' : 'default'} - options={MEMORY_UNITS_FOR_SELECTION} + options={options} value={size} /> {currentSize && (