requirements.yaml「 」参照
備考
ベータ版
AI Runtime CLI は ベータ版です。
requirements.yaml ワークロード用にインストールされているPythonライブラリを定義します。ワークロード YAML の environment ブロックから参照されます。
YAML
environment:
dependencies: requirements.yaml
ファイル形式は、Databricks ベース環境仕様に従っています。
例
YAML
environment_version: '4'
dependencies:
- --index-url https://pypi.org/simple
- -r '/Workspace/Shared/requirements.txt'
- my-library==6.1
- /Workspace/Shared/Path/To/simplejson-3.19.3-py3-none-any.whl
上記の例:
- 基本環境 v4イメージが使用されます。
- ワークスペースで参照されている
requirements.txtがインストールされています。 my-libraryバージョン6.1にてインストールされています。- ワークスペース内のホイールがインストールされています。
既存のものを再利用する requirements.txt
すでにrequirements.txtを保持している場合は、ワークスペースから直接参照してください:
YAML
version: '4'
dependencies:
- -r '/Workspace/path/to/requirements.txt'
versionフィールドはオプションであり、指定しない場合、デフォルトは"4"となります。
アホロートルの例
Axolotl でのトレーニングのための依存関係ファイル:
YAML
version: '4'
dependencies:
# Standard build tools and MLflow
- packaging
- setuptools
- wheel
- ninja
- mlflow>=3.6
# Axolotl with flash-attn and deepspeed (no build isolation)
- --no-build-isolation
- axolotl[flash-attn,deepspeed]
# Flash attention wheel (no deps — specific CUDA / torch version)
- --no-deps
- https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp312-cp312-linux_x86_64.whl