|
| 1 | +# README for build-dockerfile |
| 2 | +This README is automatically generated. Add custom content in [info.md](info.md). Please follow the [script execution document](https://docs.mlcommons.org/mlcflow/targets/script/execution-flow/) to understand more about the MLC script execution. |
| 3 | + |
| 4 | +`mlcflow` stores all local data under `$HOME/MLC` by default. So, if there is space constraint on the home directory and you have more space on say `/mnt/$USER`, you can do |
| 5 | +``` |
| 6 | +mkdir /mnt/$USER/MLC |
| 7 | +ln -s /mnt/$USER/MLC $HOME/MLC |
| 8 | +``` |
| 9 | +You can also use the `ENV` variable `MLC_REPOS` to control this location but this will need a set after every system reboot. |
| 10 | + |
| 11 | +## Setup |
| 12 | + |
| 13 | +If you are not on a Python development environment please refer to the [official docs](https://docs.mlcommons.org/mlcflow/install/) for the installation. |
| 14 | + |
| 15 | +```bash |
| 16 | +python3 -m venv mlcflow |
| 17 | +. mlcflow/bin/activate |
| 18 | +pip install mlcflow |
| 19 | +``` |
| 20 | + |
| 21 | +- Using a virtual environment is recommended (per `pip` best practices), but you may skip it or use `--break-system-packages` if needed. |
| 22 | + |
| 23 | +### Pull mlperf-automations |
| 24 | + |
| 25 | +Once `mlcflow` is installed: |
| 26 | + |
| 27 | +```bash |
| 28 | +mlc pull repo mlcommons@mlperf-automations --pat=<Your Private Access Token> |
| 29 | +``` |
| 30 | +- `--pat` or `--ssh` is only needed if the repo is PRIVATE |
| 31 | +- If `--pat` is avoided, you'll be asked to enter the password where you can enter your Private Access Token |
| 32 | +- `--ssh` option can be used instead of `--pat=<>` option if you prefer to use SSH for accessing the github repository. |
| 33 | +## Run Commands |
| 34 | + |
| 35 | +```bash |
| 36 | +mlcr build,dockerfile |
| 37 | +``` |
| 38 | + |
| 39 | +### Script Inputs |
| 40 | + |
| 41 | +| Name | Description | Choices | Default | |
| 42 | +|------|-------------|---------|------| |
| 43 | +| `--build` | | | `` | |
| 44 | +| `--cache` | | | `` | |
| 45 | +| `--mlc_repo` | | | `` | |
| 46 | +| `--mlc_repo_flags` | | | `` | |
| 47 | +| `--mlc_repos` | | | `` | |
| 48 | +| `--mlc_repo_branch` | | | `dev` | |
| 49 | +| `--comments` | | | `` | |
| 50 | +| `--copy_files` | | | `` | |
| 51 | +| `--base_image` | | | `` | |
| 52 | +| `--os` | | | `ubuntu` | |
| 53 | +| `--os_version` | | | `` | |
| 54 | +| `--docker_base_image` | Alias for base_image | | `` | |
| 55 | +| `--docker_os` | Alias for os | | `` | |
| 56 | +| `--docker_os_version` | Alias for os_version | | `` | |
| 57 | +| `--dockerfile_env` | | | `` | |
| 58 | +| `--dockerfile_build_env` | | | `` | |
| 59 | +| `--extra_sys_deps` | | | `` | |
| 60 | +| `--fake_docker_deps` | | | `` | |
| 61 | +| `--fake_run_option` | | | `` | |
| 62 | +| `--file_path` | | | `` | |
| 63 | +| `--gh_token` | | | `` | |
| 64 | +| `--image_repo` | | | `` | |
| 65 | +| `--image_tag` | | | `` | |
| 66 | +| `--mlc_repo_path` | | | `` | |
| 67 | +| `--package_manager_update_cmd` | | | `` | |
| 68 | +| `--pip_extra_flags` | | | `` | |
| 69 | +| `--post_file` | | | `` | |
| 70 | +| `--post_run_cmds` | | | `` | |
| 71 | +| `--pre_run_cmds` | | | `` | |
| 72 | +| `--real_run` | | | `` | |
| 73 | +| `--run_cmd` | | | `` | |
| 74 | +| `--run_cmd_extra` | | | `` | |
| 75 | +| `--script_tags` | | | `` | |
| 76 | +| `--skip_mlc_sys_upgrade` | | | `` | |
| 77 | +| `--push_image` | | | `` | |
| 78 | +| `--docker_not_pull_update` | | | `False` | |
| 79 | +| `--user` | | | `` | |
| 80 | +### Generic Script Inputs |
| 81 | + |
| 82 | +| Name | Description | Choices | Default | |
| 83 | +|------|-------------|---------|------| |
| 84 | +| `--input` | Input to the script passed using the env key `MLC_INPUT` | | `` | |
| 85 | +| `--output` | Output from the script passed using the env key `MLC_OUTPUT` | | `` | |
| 86 | +| `--outdirname` | The directory to store the script output | | `cache directory ($HOME/MLC/repos/local/cache/<>) if the script is cacheable or else the current directory` | |
| 87 | +| `--outbasename` | The output file/folder name | | `` | |
| 88 | +| `--name` | | | `` | |
| 89 | +| `--extra_cache_tags` | Extra cache tags to be added to the cached entry when the script results are saved | | `` | |
| 90 | +| `--skip_compile` | Skip compilation | | `False` | |
| 91 | +| `--skip_run` | Skip run | | `False` | |
| 92 | +| `--accept_license` | Accept the required license requirement to run the script | | `False` | |
| 93 | +| `--skip_system_deps` | Skip installing any system dependencies | | `False` | |
| 94 | +| `--git_ssh` | Use SSH for git repos | | `False` | |
| 95 | +| `--gh_token` | Github Token | | `` | |
| 96 | +| `--hf_token` | Huggingface Token | | `` | |
| 97 | +| `--verify_ssl` | Verify SSL | | `False` | |
| 98 | +## Variations |
| 99 | + |
| 100 | +### Ungrouped |
| 101 | + |
| 102 | +- `slim` |
0 commit comments