Skip to content

Commit 4780ef5

Browse files
committed
fix #7677 -- never set image tag for compute server unless explicitly requested; unset on image change
1 parent 8692679 commit 4780ef5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/packages/frontend/compute/google-cloud-config.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,9 +1411,11 @@ function ensureConsistentImage(configuration, changes, IMAGES) {
14111411
if (gpu && !gpuSelected) {
14121412
// GPU image but non-GPU machine -- change image to non-GPU
14131413
configuration["image"] = changes["image"] = "python";
1414+
configuration["tag"] = changes["tag"] = null;
14141415
} else if (!gpu && gpuSelected) {
14151416
// GPU machine but not image -- change image to pytorch
14161417
configuration["image"] = changes["image"] = "pytorch";
1418+
configuration["tag"] = changes["tag"] = null;
14171419
}
14181420
}
14191421

src/packages/frontend/compute/select-image.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ export default function SelectImage({
5858
useEffect(() => {
5959
setValue(configuration.image);
6060
}, [configuration.image]);
61-
// [ ] TODO: MAYBE we should allow gpu/non-gpu options in
62-
// all cases, but just suggest one or the other?
61+
6362
const options = useMemo(() => {
6463
if (IMAGES == null || typeof IMAGES == "string") {
6564
return [];
@@ -105,10 +104,12 @@ export default function SelectImage({
105104
options={options}
106105
onChange={(val) => {
107106
setValue(val);
108-
const x: any = { image: val };
107+
const x = {
108+
image: val,
109+
tag: null,
110+
};
109111
for (const option of options) {
110112
if (option.value == val) {
111-
x.tag = option.tag;
112113
setDockerSizeGb(option.dockerSizeGb);
113114
break;
114115
}

0 commit comments

Comments
 (0)