Skip to content

Commit

Permalink
[UPSTREAM] update GPU number to 0 when GPU nodes are gone
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoNoCode authored and LaVLaS committed Mar 24, 2022
1 parent aa6f581 commit 5c795c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jupyterhub_singleuser_profiles/ui/src/SizesForm/SizesForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ const SizesForm: React.FC<ImageFormProps> = ({ uiConfig, userConfig }) => {
}
}, [sizeDescriptions, userConfig]);

React.useEffect(() => {
if (!uiConfig.gpuConfig?.enabled) {
postGPUChange(0);
}
}, [uiConfig])

const sizeOptions = React.useMemo(() => {
if (!sizeList?.length || !sizeDescriptions?.length) {
return null;
Expand Down

0 comments on commit 5c795c1

Please sign in to comment.