IMPORTANT: This task is only to investigate what is possible and to identify what needs to be changed.
Today:
W&B requires root privileges to run. In (shared) enterprise environments that is not allowed.
Examples:
Starting wandb-app as nonRoot and unprivileged results in the following:
❯ k logs wandb-app-7447fdd8b6-hnb6x
Defaulted container "app" out of: app, init-db (init)
*** Killing all processes...
Traceback (most recent call last):
File "/sbin/my_init", line 475, in <module>
main(args)
File "/sbin/my_init", line 352, in main
export_envvars()
File "/sbin/my_init", line 125, in export_envvars
with open("/etc/container_environment/" + name, "w") as f:
PermissionError: [Errno 13] Permission denied: '/etc/container_environment/LANG'
or
❯ k logs wandb-app-59b7745dd5-xc4ks
Defaulted container "app" out of: app, init-db (init)
*** Killing all processes...
Traceback (most recent call last):
File "/sbin/my_init", line 475, in <module>
main(args)
File "/sbin/my_init", line 350, in main
write_envvars_to_file()
File "/sbin/my_init", line 91, in write_envvars_to_file
os.makedirs("/etc/original_variables")
File "/usr/lib/python3.10/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/etc/original_variables'
Expectation:
The following SecurityContext should be possible to configure and all W&B pods run without issues:
runAsNonRoot: true
allowPrivilegeEscalation: false
privileged: false
runAsUser: 2000
runAsGroup: 2000
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
The result of this tasks should be a list of changes that are required to be implemented to make the above security context possible.
IMPORTANT: This task is only to investigate what is possible and to identify what needs to be changed.
Today:
W&B requires root privileges to run. In (shared) enterprise environments that is not allowed.
Examples:
Starting wandb-app as nonRoot and unprivileged results in the following:
or
Expectation:
The following SecurityContext should be possible to configure and all W&B pods run without issues:
The result of this tasks should be a list of changes that are required to be implemented to make the above security context possible.