cube-studio/job-template/job/tf_distributed_train_k8s
2022-07-26 20:47:20 +08:00
..
build.sh 添加tfjob 2022-07-19 16:54:42 +08:00
Dockerfile 模板demo示例 2022-07-26 20:47:20 +08:00
launcher.py 模板demo示例 2022-07-26 20:47:20 +08:00
README.md 模板demo示例 2022-07-26 20:47:20 +08:00

镜像ccr.ccs.tencentyun.com/cube-studio/tf_distributed_train_k8s:20221010

账号kubeflow-pipeline

参数:

{
    "shell": {
        "--image": {
            "type": "str",
            "item_type": "str",
            "label": "worker镜像直接运行你代码的环境镜像",
            "require": 1,
            "choice": [],
            "range": "",
            "default": "ccr.ccs.tencentyun.com/cube-studio/ubuntu-gpu:cuda10.1-cudnn7-python3.6",
            "placeholder": "",
            "describe": "worker镜像直接运行你代码的环境镜像 <a href='https://github.com/tencentmusic/cube-studio/tree/master/images'>基础镜像</a>",
            "editable": 1,
            "condition": "",
            "sub_args": {}
        },
        "--working_dir": {
            "type": "str",
            "item_type": "str",
            "label": "命令的启动目录",
            "require": 1,
            "choice": [],
            "range": "",
            "default": "/mnt/xxx/pytorchjob/",
            "placeholder": "",
            "describe": "命令的启动目录",
            "editable": 1,
            "condition": "",
            "sub_args": {}
        },
        "--command": {
            "type": "str",
            "item_type": "str",
            "label": "启动命令,例如 python3 xxx.py",
            "require": 1,
            "choice": [],
            "range": "",
            "default": "",
            "placeholder": "启动命令,例如 python3 xxx.py",
            "describe": "启动命令,例如 python3 xxx.py",
            "editable": 1,
            "condition": "",
            "sub_args": {}
        },
        "--num_worker": {
            "type": "str",
            "item_type": "str",
            "label": "分布式训练worker的数目",
            "require": 1,
            "choice": [],
            "range": "",
            "default": "3",
            "placeholder": "分布式训练worker的数目",
            "describe": "分布式训练worker的数目",
            "editable": 1,
            "condition": "",
            "sub_args": {}
        }
    }
}

环境变量

NO_RESOURCE_CHECK=true
TASK_RESOURCE_CPU=2
TASK_RESOURCE_MEMORY=4G
TASK_RESOURCE_GPU=0

示例代码

启动脚本

python demo.py

示例代码 demo.py