mirror of
https://github.com/clearml/clearml-agent
synced 2025-06-26 18:16:15 +00:00
Add support for container rulebook overrides ('force_container_rules: true') and container rulebook task update ('update_back_task: true').
This addition allows users to override container arguments forcefully based on the tasks properties (repo, tags, project, user etc.), as well as offer additional defaults based on python required packages or python versions
This commit is contained in:
@@ -236,20 +236,35 @@
|
||||
docker_force_pull: false
|
||||
|
||||
default_docker: {
|
||||
# default docker image to use when running in docker mode
|
||||
image: "nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu20.04"
|
||||
# default container image to use when running in docker mode
|
||||
image: "nvidia/cuda:12.6.3-cudnn-runtime-ubuntu20.04"
|
||||
|
||||
# optional arguments to pass to docker image
|
||||
# arguments: ["--ipc=host", ]
|
||||
|
||||
# Choose the default docker based on the Task properties,
|
||||
# Notice: Enterprise feature, ignored otherwise
|
||||
# Examples: 'script.requirements', 'script.binary', 'script.repository', 'script.branch', 'project'
|
||||
# Notice: Matching is done via regular expression, for example "^searchme$" will match exactly "searchme" string
|
||||
# if true update the Task container section based on the selected rule/default
|
||||
# can also be set/override per specific rule
|
||||
update_back_task: true
|
||||
|
||||
# **Notice**: Enterprise feature, ignored otherwise
|
||||
# Choose the default container based on the Task properties,
|
||||
# container values that can be changed: "image", "arguments" , "setup_shell_script"
|
||||
# Notice: adding "force_container_rules: true" to a rule,
|
||||
# will cause it to IGNORE the Task's requested container and use the configuration of the rule,
|
||||
# including all its entries (image, arguments, setup_shell_script)!
|
||||
# Rule selector keys: 'script.requirements', 'script.binary',
|
||||
# 'script.repository', 'script.branch',
|
||||
# 'project', 'project_id', 'user_id', 'container', 'tags'
|
||||
# Notice: Matching is done via regular expression and needs to match ALL entries inside the rule,
|
||||
# matching re example: "^searchme$" will match exactly "searchme" string inside an entry
|
||||
# specifically for tags single tag match is enough:
|
||||
# "^my_tag$" will match a Task that has
|
||||
# multiple tags one of them matches ["general_tag", "my_tag$"]
|
||||
"match_rules": [
|
||||
{
|
||||
"image": "python:3.6-bullseye",
|
||||
"arguments": "--ipc=host",
|
||||
"update_back_task": true,
|
||||
"match": {
|
||||
"script": {
|
||||
"binary": "python3.6$",
|
||||
@@ -259,6 +274,7 @@
|
||||
{
|
||||
"image": "python:3.7-bullseye",
|
||||
"arguments": "--ipc=host",
|
||||
"update_back_task": true,
|
||||
"match": {
|
||||
"script": {
|
||||
"binary": "python3.7$",
|
||||
@@ -310,6 +326,15 @@
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"image": "python:3.13-bullseye",
|
||||
"arguments": "--ipc=host",
|
||||
"match": {
|
||||
"script": {
|
||||
"binary": "python3.13$",
|
||||
},
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user