{"id":13411015,"url":"https://github.com/iterative/cml","last_synced_at":"2025-05-12T11:18:36.826Z","repository":{"id":36992453,"uuid":"243197559","full_name":"iterative/cml","owner":"iterative","description":"♾️ CML - Continuous Machine Learning | CI/CD for ML","archived":false,"fork":false,"pushed_at":"2025-05-05T05:18:24.000Z","size":17230,"stargazers_count":4098,"open_issues_count":79,"forks_count":347,"subscribers_count":50,"default_branch":"main","last_synced_at":"2025-05-11T11:11:28.007Z","etag":null,"topics":["bitbucket-pipelines","ci","ci-cd","cicd","cli","continuous-delivery","continuous-integration","data-science","developer-tools","github-actions","gitlab-ci","hacktoberfest","machine-learning"],"latest_commit_sha":null,"homepage":"http://cml.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iterative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-26T07:33:41.000Z","updated_at":"2025-05-10T07:05:54.000Z","dependencies_parsed_at":"2024-09-26T18:20:30.571Z","dependency_job_id":"2519104e-fbc6-43be-8e35-9f6bb1e244db","html_url":"https://github.com/iterative/cml","commit_stats":{"total_commits":627,"total_committers":36,"mean_commits":"17.416666666666668","dds":0.6985645933014354,"last_synced_commit":"a3a66c74b218b08710f42bf599b066e37cb4cba7"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterative%2Fcml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterative%2Fcml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterative%2Fcml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iterative%2Fcml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iterative","download_url":"https://codeload.github.com/iterative/cml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253554089,"owners_count":21926614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket-pipelines","ci","ci-cd","cicd","cli","continuous-delivery","continuous-integration","data-science","developer-tools","github-actions","gitlab-ci","hacktoberfest","machine-learning"],"created_at":"2024-07-30T20:01:10.851Z","updated_at":"2025-05-11T11:11:38.103Z","avatar_url":"https://github.com/iterative.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://static.iterative.ai/img/cml/title_strip_trim.png\" width=400\u003e\n\u003c/p\u003e\n\n[![GHA](https://img.shields.io/github/v/tag/iterative/setup-cml?label=GitHub%20Actions\u0026logo=GitHub)](https://github.com/iterative/setup-cml)\n[![npm](https://img.shields.io/npm/v/@dvcorg/cml?logo=npm)](https://www.npmjs.com/package/@dvcorg/cml)\n\n**What is CML?** Continuous Machine Learning (CML) is an open-source CLI tool\nfor implementing continuous integration \u0026 delivery (CI/CD) with a focus on\nMLOps. Use it to automate development workflows — including machine\nprovisioning, model training and evaluation, comparing ML experiments across\nproject history, and monitoring changing datasets.\n\nCML can help train and evaluate models — and then generate a visual report with\nresults and metrics — automatically on every pull request.\n\n![](https://static.iterative.ai/img/cml/github_cloud_case_lessshadow.png) _An\nexample report for a\n[neural style transfer model](https://github.com/iterative/cml_cloud_case)._\n\nCML principles:\n\n- **[GitFlow](https://nvie.com/posts/a-successful-git-branching-model) for data\n  science.** Use GitLab or GitHub to manage ML experiments, track who trained ML\n  models or modified data and when. Codify data and models with\n  [DVC](#using-cml-with-dvc) instead of pushing to a Git repo.\n- **Auto reports for ML experiments.** Auto-generate reports with metrics and\n  plots in each Git pull request. Rigorous engineering practices help your team\n  make informed, data-driven decisions.\n- **No additional services.** Build your own ML platform using GitLab,\n  Bitbucket, or GitHub. Optionally, use\n  [cloud storage](#configuring-cloud-storage-providers) as well as either\n  self-hosted or cloud runners (such as AWS EC2 or Azure). No databases,\n  services or complex setup needed.\n\n:question: Need help? Just want to chat about continuous integration for ML?\n[Visit our Discord channel!](https://discord.gg/bzA6uY7)\n\n:play_or_pause_button: Check out our\n[YouTube video series](https://www.youtube.com/playlist?list=PL7WG7YrwYcnDBDuCkFbcyjnZQrdskFsBz)\nfor hands-on MLOps tutorials using CML!\n\n## Table of Contents\n\n1. [Setup (GitLab, GitHub, Bitbucket)](#setup)\n2. [Usage](#usage)\n3. [Getting started (tutorial)](#getting-started)\n4. [Using CML with DVC](#using-cml-with-dvc)\n5. [Advanced Setup (Self-hosted, local package)](#advanced-setup)\n6. [Example projects](#see-also)\n\n## Setup\n\nYou'll need a GitLab, GitHub, or Bitbucket account to begin. Users may wish to\nfamiliarize themselves with [Github Actions](https://help.github.com/en/actions)\nor\n[GitLab CI/CD](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration).\nHere, will discuss the GitHub use case.\n\n### GitLab\n\nPlease see our docs on\n[CML with GitLab CI/CD](https://github.com/iterative/cml/wiki/CML-with-GitLab)\nand in particular the\n[personal access token](https://github.com/iterative/cml/wiki/CML-with-GitLab#variables)\nrequirement.\n\n### Bitbucket\n\nPlease see our docs on\n[CML with Bitbucket Cloud](https://cml.dev/doc/usage?tab=Bitbucket).\n\n### GitHub\n\nThe key file in any CML project is `.github/workflows/cml.yaml`:\n\n```yaml\nname: your-workflow-name\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    # optionally use a convenient Ubuntu LTS + DVC + CML image\n    # container: ghcr.io/iterative/cml:0-dvc2-base1\n    steps:\n      - uses: actions/checkout@v3\n      # may need to setup NodeJS \u0026 Python3 on e.g. self-hosted\n      # - uses: actions/setup-node@v3\n      #   with:\n      #     node-version: '16'\n      # - uses: actions/setup-python@v4\n      #   with:\n      #     python-version: '3.x'\n      - uses: iterative/setup-cml@v1\n      - name: Train model\n        run: |\n          # Your ML workflow goes here\n          pip install -r requirements.txt\n          python train.py\n      - name: Write CML report\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          # Post reports as comments in GitHub PRs\n          cat results.txt \u003e\u003e report.md\n          cml comment create report.md\n```\n\n## Usage\n\nWe helpfully provide CML and other useful libraries pre-installed on our\n[custom Docker images](https://github.com/iterative/cml/blob/mains/Dockerfile).\nIn the above example, uncommenting the field\n`container: ghcr.io/iterative/cml:0-dvc2-base1`) will make the runner pull the\nCML Docker image. The image already has NodeJS, Python 3, DVC and CML set up on\nan Ubuntu LTS base for convenience.\n\n### CML Functions\n\nCML provides a number of functions to help package the outputs of ML workflows\n(including numeric data and visualizations about model performance) into a CML\nreport.\n\nBelow is a table of CML functions for writing markdown reports and delivering\nthose reports to your CI system.\n\n| Function                  | Description                                                      | Example Inputs                                              |\n| ------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------- |\n| `cml runner launch`       | Launch a runner locally or hosted by a cloud provider            | See [Arguments](https://github.com/iterative/cml#arguments) |\n| `cml comment create`      | Return CML report as a comment in your GitLab/GitHub workflow    | `\u003cpath to report\u003e --head-sha \u003csha\u003e`                         |\n| `cml check create`        | Return CML report as a check in GitHub                           | `\u003cpath to report\u003e --head-sha \u003csha\u003e`                         |\n| `cml pr create`           | Commit the given files to a new branch and create a pull request | `\u003cpath\u003e...`                                                 |\n| `cml tensorboard connect` | Return a link to a Tensorboard.dev page                          | `--logdir \u003cpath to logs\u003e --title \u003cexperiment title\u003e --md`   |\n\n#### CML Reports\n\nThe `cml comment create` command can be used to post reports. CML reports are\nwritten in markdown ([GitHub](https://github.github.com/gfm),\n[GitLab](https://docs.gitlab.com/ee/user/markdown.html), or\n[Bitbucket](https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html)\nflavors). That means they can contain images, tables, formatted text, HTML\nblocks, code snippets and more — really, what you put in a CML report is up to\nyou. Some examples:\n\n:spiral_notepad: **Text** Write to your report using whatever method you prefer.\nFor example, copy the contents of a text file containing the results of ML model\ntraining:\n\n```bash\ncat results.txt \u003e\u003e report.md\n```\n\n:framed_picture: **Images** Display images using the markdown or HTML. Note that\nif an image is an output of your ML workflow (i.e., it is produced by your\nworkflow), it can be uploaded and included automaticlly to your CML report. For\nexample, if `graph.png` is output by `python train.py`, run:\n\n```bash\necho \"![](./graph.png)\" \u003e\u003e report.md\ncml comment create report.md\n```\n\n### Getting Started\n\n1. Fork our\n   [example project repository](https://github.com/iterative-test/cml-example-base).\n\n\u003e :warning: Note that if you are using GitLab,\n\u003e [you will need to create a Personal Access Token](https://github.com/iterative/cml/wiki/CML-with-GitLab#variables)\n\u003e for this example to work.\n\n![](https://static.iterative.ai/img/cml/fork_project.png)\n\n\u003e :warning: The following steps can all be done in the GitHub browser interface.\n\u003e However, to follow along with the commands, we recommend cloning your fork to\n\u003e your local workstation:\n\n```bash\ngit clone https://github.com/\u003cyour-username\u003e/example_cml\n```\n\n2. To create a CML workflow, copy the following into a new file,\n   `.github/workflows/cml.yaml`:\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-python@v4\n      - uses: iterative/setup-cml@v1\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt \u003e\u003e report.md\n          echo \"![](./plot.png)\" \u003e\u003e report.md\n          cml comment create report.md\n```\n\n3. In your text editor of choice, edit line 16 of `train.py` to `depth = 5`.\n\n4. Commit and push the changes:\n\n```bash\ngit checkout -b experiment\ngit add . \u0026\u0026 git commit -m \"modify forest depth\"\ngit push origin experiment\n```\n\n5. In GitHub, open up a pull request to compare the `experiment` branch to\n   `main`.\n\n![](https://static.iterative.ai/img/cml/make_pr.png)\n\nShortly, you should see a comment from `github-actions` appear in the pull\nrequest with your CML report. This is a result of the `cml send-comment`\nfunction in your workflow.\n\n![](https://static.iterative.ai/img/cml/first_report.png)\n\nThis is the outline of the CML workflow:\n\n- you push changes to your GitHub repository,\n- the workflow in your `.github/workflows/cml.yaml` file gets run, and\n- a report is generated and posted to GitHub.\n\nCML functions let you display relevant results from the workflow — such as model\nperformance metrics and visualizations — in GitHub checks and comments. What\nkind of workflow you want to run, and want to put in your CML report, is up to\nyou.\n\n### Using CML with DVC\n\nIn many ML projects, data isn't stored in a Git repository, but needs to be\ndownloaded from external sources. [DVC](https://dvc.org) is a common way to\nbring data to your CML runner. DVC also lets you visualize how metrics differ\nbetween commits to make reports like this:\n\n![](https://static.iterative.ai/img/cml/dvc_long_report.png)\n\nThe `.github/workflows/cml.yaml` file used to create this report is:\n\n```yaml\nname: model-training\non: [push]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    container: ghcr.io/iterative/cml:0-dvc2-base1\n    steps:\n      - uses: actions/checkout@v3\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        run: |\n          # Install requirements\n          pip install -r requirements.txt\n\n          # Pull data \u0026 run-cache from S3 and reproduce pipeline\n          dvc pull data --run-cache\n          dvc repro\n\n          # Report metrics\n          echo \"## Metrics\" \u003e\u003e report.md\n          git fetch --prune\n          dvc metrics diff main --show-md \u003e\u003e report.md\n\n          # Publish confusion matrix diff\n          echo \"## Plots\" \u003e\u003e report.md\n          echo \"### Class confusions\" \u003e\u003e report.md\n          dvc plots diff --target classes.csv --template confusion -x actual -y predicted --show-vega main \u003e vega.json\n          vl2png vega.json -s 1.5 \u003e confusion_plot.png\n          echo \"![](./confusion_plot.png)\" \u003e\u003e report.md\n\n          # Publish regularization function diff\n          echo \"### Effects of regularization\" \u003e\u003e report.md\n          dvc plots diff --target estimators.csv -x Regularization --show-vega main \u003e vega.json\n          vl2png vega.json -s 1.5 \u003e plot.png\n          echo \"![](./plot.png)\" \u003e\u003e report.md\n\n          cml comment create report.md\n```\n\n\u003e :warning: If you're using DVC with cloud storage, take note of environment\n\u003e variables for your storage format.\n\n#### Configuring Cloud Storage Providers\n\nThere are many\n[supported could storage providers](https://dvc.org/doc/command-reference/remote/modify#available-parameters-per-storage-type).\nHere are a few examples for some of the most frequently used providers:\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n  S3 and S3-compatible storage (Minio, DigitalOcean Spaces, IBM Cloud Object Storage...)\n  \u003c/summary\u003e\n\n```yaml\n# Github\nenv:\n  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n  AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}\n```\n\n\u003e :point_right: `AWS_SESSION_TOKEN` is optional.\n\n\u003e :point_right: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` can also be used\n\u003e by `cml runner` to launch EC2 instances. See [Environment Variables].\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n  Azure\n  \u003c/summary\u003e\n\n```yaml\nenv:\n  AZURE_STORAGE_CONNECTION_STRING:\n    ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}\n  AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n  Aliyun\n  \u003c/summary\u003e\n\n```yaml\nenv:\n  OSS_BUCKET: ${{ secrets.OSS_BUCKET }}\n  OSS_ACCESS_KEY_ID: ${{ secrets.OSS_ACCESS_KEY_ID }}\n  OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}\n  OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n  Google Storage\n  \u003c/summary\u003e\n\n\u003e :warning: Normally, `GOOGLE_APPLICATION_CREDENTIALS` is the **path** of the\n\u003e `json` file containing the credentials. However in the action this secret\n\u003e variable is the **contents** of the file. Copy the `json` contents and add it\n\u003e as a secret.\n\n```yaml\nenv:\n  GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n  Google Drive\n  \u003c/summary\u003e\n\n\u003e :warning: After configuring your\n\u003e [Google Drive credentials](https://dvc.org/doc/command-reference/remote/add)\n\u003e you will find a `json` file at\n\u003e `your_project_path/.dvc/tmp/gdrive-user-credentials.json`. Copy its contents\n\u003e and add it as a secret variable.\n\n```yaml\nenv:\n  GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}\n```\n\n\u003c/details\u003e\n\n## Advanced Setup\n\n### Self-hosted (On-premise or Cloud) Runners\n\nGitHub Actions are run on GitHub-hosted runners by default. However, there are\nmany great reasons to use your own runners: to take advantage of GPUs,\norchestrate your team's shared computing resources, or train in the cloud.\n\n\u003e :point_up: **Tip!** Check out the\n\u003e [official GitHub documentation](https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners)\n\u003e to get started setting up your own self-hosted runner.\n\n#### Allocating Cloud Compute Resources with CML\n\nWhen a workflow requires computational resources (such as GPUs), CML can\nautomatically allocate cloud instances using `cml runner`. You can spin up\ninstances on AWS, Azure, GCP, or Kubernetes.\n\nFor example, the following workflow deploys a `g4dn.xlarge` instance on AWS EC2\nand trains a model on the instance. After the job runs, the instance\nautomatically shuts down.\n\nYou might notice that this workflow is quite similar to the\n[basic use case](#usage) above. The only addition is `cml runner` and a few\nenvironment variables for passing your cloud service credentials to the\nworkflow.\n\nNote that `cml runner` will also automatically restart your jobs (whether from a\n[GitHub Actions 35-day workflow timeout](https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration#usage-limits)\nor a\n[AWS EC2 spot instance interruption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html)).\n\n```yaml\nname: Train-in-the-cloud\non: [push]\njobs:\n  deploy-runner:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: iterative/setup-cml@v1\n      - uses: actions/checkout@v3\n      - name: Deploy runner on EC2\n        env:\n          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n        run: |\n          cml runner launch \\\n            --cloud=aws \\\n            --cloud-region=us-west \\\n            --cloud-type=g4dn.xlarge \\\n            --labels=cml-gpu\n  train-model:\n    needs: deploy-runner\n    runs-on: [self-hosted, cml-gpu]\n    timeout-minutes: 50400 # 35 days\n    container:\n      image: ghcr.io/iterative/cml:0-dvc2-base1-gpu\n      options: --gpus all\n    steps:\n      - uses: actions/checkout@v3\n      - name: Train model\n        env:\n          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: |\n          pip install -r requirements.txt\n          python train.py\n\n          cat metrics.txt \u003e report.md\n          cml comment create report.md\n```\n\nIn the workflow above, the `deploy-runner` step launches an EC2 `g4dn.xlarge`\ninstance in the `us-west` region. The `model-training` step then runs on the\nnewly-launched instance. See [Environment Variables] below for details on the\n`secrets` required.\n\n\u003e :tada: **Note that jobs can use any Docker container!** To use functions such\n\u003e as `cml send-comment` from a job, the only requirement is to\n\u003e [have CML installed](#local-package).\n\n#### Docker Images\n\nThe CML Docker image (`ghcr.io/iterative/cml` or `iterativeai/cml`) comes loaded\nwith Python, CUDA, `git`, `node` and other essentials for full-stack data\nscience. Different versions of these essentials are available from different\nimage tags. The tag convention is `{CML_VER}-dvc{DVC_VER}-base{BASE_VER}{-gpu}`:\n\n| `{BASE_VER}` | Software included (`-gpu`)                    |\n| ------------ | --------------------------------------------- |\n| 0            | Ubuntu 18.04, Python 2.7 (CUDA 10.1, CuDNN 7) |\n| 1            | Ubuntu 20.04, Python 3.8 (CUDA 11.2, CuDNN 8) |\n\nFor example, `iterativeai/cml:0-dvc2-base1-gpu`, or\n`ghcr.io/iterative/cml:0-dvc2-base1`.\n\n#### Arguments\n\nThe `cml runner launch` function accepts the following arguments:\n\n```\n  --labels                                  One or more user-defined labels for\n                                            this runner (delimited with commas)\n                                                       [string] [default: \"cml\"]\n  --idle-timeout                            Time to wait for jobs before\n                                            shutting down (e.g. \"5min\"). Use\n                                            \"never\" to disable\n                                                 [string] [default: \"5 minutes\"]\n  --name                                    Name displayed in the repository\n                                            once registered\n                                                    [string] [default: cml-{ID}]\n  --no-retry                                Do not restart workflow terminated\n                                            due to instance disposal or GitHub\n                                            Actions timeout            [boolean]\n  --single                                  Exit after running a single job\n                                                                       [boolean]\n  --reuse                                   Don't launch a new runner if an\n                                            existing one has the same name or\n                                            overlapping labels         [boolean]\n  --reuse-idle                              Creates a new runner only if the\n                                            matching labels don't exist or are\n                                            already busy               [boolean]\n  --docker-volumes                          Docker volumes, only supported in\n                                            GitLab         [array] [default: []]\n  --cloud                                   Cloud to deploy the runner\n                         [string] [choices: \"aws\", \"azure\", \"gcp\", \"kubernetes\"]\n  --cloud-region                            Region where the instance is\n                                            deployed. Choices: [us-east,\n                                            us-west, eu-west, eu-north]. Also\n                                            accepts native cloud regions\n                                                   [string] [default: \"us-west\"]\n  --cloud-type                              Instance type. Choices: [m, l, xl].\n                                            Also supports native types like i.e.\n                                            t2.micro                    [string]\n  --cloud-permission-set                    Specifies the instance profile in\n                                            AWS or instance service account in\n                                            GCP           [string] [default: \"\"]\n  --cloud-metadata                          Key Value pairs to associate\n                                            cml-runner instance on the provider\n                                            i.e. tags/labels \"key=value\"\n                                                           [array] [default: []]\n  --cloud-gpu                               GPU type. Choices: k80, v100, or\n                                            native types e.g. nvidia-tesla-t4\n                                                                        [string]\n  --cloud-hdd-size                          HDD size in GB              [number]\n  --cloud-ssh-private                       Custom private RSA SSH key. If not\n                                            provided an automatically generated\n                                            throwaway key will be used  [string]\n  --cloud-spot                              Request a spot instance    [boolean]\n  --cloud-spot-price                        Maximum spot instance bidding price\n                                            in USD. Defaults to the current spot\n                                            bidding price [number] [default: -1]\n  --cloud-startup-script                    Run the provided Base64-encoded\n                                            Linux shell script during the\n                                            instance initialization     [string]\n  --cloud-aws-security-group                Specifies the security group in AWS\n                                                          [string] [default: \"\"]\n  --cloud-aws-subnet,                       Specifies the subnet to use within\n  --cloud-aws-subnet-id                     AWS           [string] [default: \"\"]\n\n```\n\n#### Environment Variables\n\n\u003e :warning: You will need to\n\u003e [create a personal access token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)\n\u003e with repository read/write access and workflow privileges. In the example\n\u003e workflow, this token is stored as `PERSONAL_ACCESS_TOKEN`.\n\n:information_source: If using the `--cloud` option, you will also need to\nprovide access credentials of your cloud compute resources as secrets. In the\nabove example, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (with privileges\nto create \u0026 destroy EC2 instances) are required.\n\nFor AWS, the same credentials can also be used for\n[configuring cloud storage](#configuring-cloud-storage-providers).\n\n#### Proxy support\n\nCML support proxy via known environment variables `http_proxy` and\n`https_proxy`.\n\n#### On-premise (Local) Runners\n\nThis means using on-premise machines as self-hosted runners. The\n`cml runner launch` function is used to set up a local self-hosted runner. On a\nlocal machine or on-premise GPU cluster,\n[install CML as a package](#local-package) and then run:\n\n```bash\ncml runner launch \\\n  --repo=$your_project_repository_url \\\n  --token=$PERSONAL_ACCESS_TOKEN \\\n  --labels=\"local,runner\" \\\n  --idle-timeout=180\n```\n\nThe machine will listen for workflows from your project repository.\n\n### Local Package\n\nIn the examples above, CML is installed by the `setup-cml` action, or comes\npre-installed in a custom Docker image pulled by a CI runner. You can also\ninstall CML as a package:\n\n```bash\nnpm install --location=global @dvcorg/cml\n```\n\nYou can use `cml` without node by downloading the correct standalone binary for\nyour system from the asset section of the\n[releases](https://github.com/iterative/cml/releases).\n\nYou may need to install additional dependencies to use DVC plots and Vega-Lite\nCLI commands:\n\n```bash\nsudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev \\\n                        librsvg2-dev libfontconfig-dev\nnpm install -g vega-cli vega-lite\n```\n\nCML and Vega-Lite package installation require the NodeJS package manager\n(`npm`) which ships with NodeJS. Installation instructions are below.\n\n#### Install NodeJS\n\n- **GitHub**: This is probably not necessary when using GitHub's default\n  containers or one of CML's Docker containers. Self-hosted runners may need to\n  use a set up action to install NodeJS:\n\n```bash\nuses: actions/setup-node@v3\n  with:\n    node-version: '16'\n```\n\n- **GitLab**: Requires direct installation.\n\n```bash\ncurl -sL https://deb.nodesource.com/setup_16.x | bash\napt-get update\napt-get install -y nodejs\n```\n\n## See Also\n\nThese are some example projects using CML.\n\n- [Basic CML project](https://github.com/iterative-test/cml-example-minimal)\n- [CML with DVC to pull data](https://github.com/iterative-test/cml-example-dvc)\n- [CML with Tensorboard](https://github.com/iterative-test/cml-example-tensorboard)\n- [CML with a small EC2 instance](https://github.com/iterative-test/cml-example-cloud)\n  :key:\n- [CML with EC2 GPU](https://github.com/iterative-test/cml-example-cloud-gpu)\n  :key:\n\n:key: needs a [PAT](#environment-variables).\n\n# :warning: Maintenance :warning:\n\n- ~2023-07 Nvidia has dropped container CUDA images with\n  [10.x](https://hub.docker.com/r/nvidia/cuda/tags?page=1\u0026name=10)/[cudnn7](https://hub.docker.com/r/nvidia/cuda/tags?page=1\u0026name=cudnn7)\n  and [11.2.1](https://hub.docker.com/r/nvidia/cuda/tags?page=1\u0026name=11.2.1),\n  CML images will be updated accrodingly\n","funding_links":[],"categories":["JavaScript","🔄 CI/CD for ML","The Data Science Toolbox","Model Training and Orchestration","其他_机器学习与深度学习","Tools","CI/CD for Machine Learning","Uncategorized"],"sub_categories":["Miscellaneous Tools","General-Purpose Machine Learning","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiterative%2Fcml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiterative%2Fcml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiterative%2Fcml/lists"}