Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 92a85f0

Browse files
inureyesadrysn
andauthored
feat: manual image name support without debug flag (#37)
* feat: manual image name support without debug flag * Add missing library stubs * Add news fragment Co-authored-by: Jonghyun Park <adrysn@gmail.com>
1 parent 0599914 commit 92a85f0

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

changes/37.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add an option to support creating a compute session by manually typing the name of an image.

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ lint =
6363
flake8~=3.9.0
6464
typecheck =
6565
mypy>=0.800
66+
types-pkg_resources
67+
types-toml
6668

6769
[options.packages.find]
6870
where = src

src/ai/backend/web/server.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
allowChangeSigninMode = {{allow_change_signin_mode}}
7070
allowAnonymousChangePassword = {{allow_anonymous_change_password}}
7171
allowProjectResourceMonitor = {{allow_project_resource_monitor}}
72+
allowManualImageNameForSession = {{allow_manual_image_name_for_session}}
7273
autoLogout = {{auto_logout}}
7374
7475
[resources]
@@ -178,8 +179,10 @@ async def console_handler(request: web.Request) -> web.StreamResponse:
178179
'true' if config['service'].get('allow_anonymous_change_password') else 'false',
179180
'allow_project_resource_monitor':
180181
'true' if config['service']['allow_project_resource_monitor'] else 'false',
182+
'allow_manual_image_name_for_session':
183+
'true' if config['service'].get('allow_manual_image_name_for_session') else 'false',
181184
'auto_logout':
182-
'true' if config['service'].get('auto_logout') else 'false',
185+
'true' if config['session'].get('auto_logout') else 'false',
183186
'open_port_to_public': open_port_to_public,
184187
'max_cpu_cores_per_container': max_cpu_cores_per_container,
185188
'max_cuda_devices_per_container': max_cuda_devices_per_container,

webserver.sample.conf

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ allow_anonymous_change_password = false
2525
allow_project_resource_monitor = false
2626
# Allow users to change signin mode between ID/Password and IAM mode
2727
allow_change_signin_mode = false
28+
# Allow users to use the specific environment image by typing the exact name.
29+
allow_manual_image_name_for_session = false
2830

2931
[resources]
3032
# Display "Open port to public" checkbox in the app launcher.

0 commit comments

Comments
 (0)