Skip to content

Commit

Permalink
feat: Add show_non_installed_images config on webserver (#3124) (#3130
Browse files Browse the repository at this point in the history
)

Co-authored-by: Jihyun Kang <[email protected]>
  • Loading branch information
lablup-octodog and lizable authored Nov 22, 2024
1 parent 224879b commit 48c38b5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/3124.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add an `show_non_installed_images` option to show all images regardless of installation on environment select section in session/service launcher page.
2 changes: 2 additions & 0 deletions configs/webserver/sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ max_file_upload_size = 4294967296
# e.g. cr.backend.ai/stable/python
# You should pick default_environment in ui section too.
#allowlist = ""
# Show all environment images regardless of installation
show_non_installed_images = false

[plugin]
# Comma-separated string
Expand Down
1 change: 1 addition & 0 deletions src/ai/backend/web/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
}).allow_extra("*"),
t.Key("environments"): t.Dict({
t.Key("allowlist", default=None): t.Null | tx.StringList(empty_str_as_empty_list=True),
t.Key("show_non_installed_images", default=False): t.ToBool,
}).allow_extra("*"),
t.Key("plugin"): t.Dict({
t.Key("page", default=None): t.Null | tx.StringList(empty_str_as_empty_list=True),
Expand Down
1 change: 1 addition & 0 deletions src/ai/backend/web/templates/config.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ connectionMode = "SESSION"

[environments]
{% toml_strlist_field "allowlist" config["environments"]["allowlist"] %}
{% toml_field "showNonInstalledImages" config["environments"]["show_non_installed_images"] %}

[menu]
{% toml_strlist_field "blocklist" config["ui"]["menu_blocklist"] %}
Expand Down
4 changes: 4 additions & 0 deletions src/ai/backend/web/templates/config_ini.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{% toml_field "enableLLMPlayground" config["ui"]["enable_LLM_playground"] %}
connectionMode = "SESSION"

[environments]
{% toml_strlist_field "allowlist" config["environments"]["allowlist"] %}
{% toml_field "showNonInstalledImages" config["environments"]["show_non_installed_images"] %}

[wsproxy]
{% toml_field "proxyURL" config["service"]["wsproxy"]["url"] %}
# proxyBaseURL =
Expand Down

0 comments on commit 48c38b5

Please sign in to comment.