mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
[Fix]: Building runtime image with unspecified base container img (#7977)
This commit is contained in:
parent
4f9120ffc6
commit
44d488b718
@ -1,6 +1,6 @@
|
||||
import os
|
||||
|
||||
from pydantic import BaseModel, Field, ValidationError
|
||||
from pydantic import BaseModel, Field, ValidationError, model_validator
|
||||
|
||||
|
||||
class SandboxConfig(BaseModel):
|
||||
@ -98,3 +98,9 @@ class SandboxConfig(BaseModel):
|
||||
raise ValueError(f'Invalid sandbox configuration: {e}')
|
||||
|
||||
return sandbox_mapping
|
||||
|
||||
@model_validator(mode="after")
|
||||
def set_default_base_image(self) -> "SandboxConfig":
|
||||
if self.base_container_image is None:
|
||||
self.base_container_image = 'nikolaik/python-nodejs:python3.12-nodejs22'
|
||||
return self
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user