Note
While using TrueFoundry python SDKtype is not a required field in any of the imported classesFor image you can either give link to a pre-existing image via
Image module, or give instructions on how to build the image via the Build classDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API reference for Image and Build configuration schemas used to specify Docker images and build instructions.
type is not a required field in any of the imported classesImage module, or give instructions on how to build the image via the Build class{
"type": "string",
"image_uri": "string",
"docker_registry": "string",
"command": null
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=image |
| image_uri | string | true | The image URI. Specify the name of the image and the tag. If the image is in Dockerhub, you can skip registry-url (for e.g. tensorflow/tensorflow). You can use an image from a private registry using Advanced fields |
| docker_registry | string | false | FQN of the container registry. If you can’t find your registry, add it through the Integrations page. |
| command | any | false | Override the command to run when container starts. When deploying a Job, the command can be templatized by defining params and referencing them in command E.g. python main.py --learning_rate {{learning_rate}} |
{
"type": "string",
"docker_registry": "string",
"build_source": {},
"build_spec": {}
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=build |
| docker_registry | string | false | FQN of the container registry. If you can’t find your registry, add it through the Integrations page. |
| build_source | object | true | Source code location. |
| build_spec | object | true | Instructions to build a container image out of the build source |
{
"type": "string",
"python_version": "3.9",
"build_context_path": "./",
"requirements_path": "string",
"pip_packages": [
"string"
],
"apt_packages": [
"string"
],
"command": null,
"cuda_version": "string"
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=tfy-python-buildpack |
| python_version | string | true | Python version to run your application. Should be one of the tags listed onOfficial Python Docker Page |
| build_context_path | string | true | Build path relative to project root path. |
| requirements_path | string | false | Path to requirements.txt relative to Path to build context |
| pip_packages | [string] | false | Define pip package requirements. In Python/YAML E.g. [“fastapi>=0.90,<1.0”, “uvicorn”] |
| apt_packages | [string] | false | Debian packages to install via apt get. In Python/YAML E.g. [“git”, “ffmpeg”, “htop”] |
| command | any | true | Command to run when the container starts. Command will be set as the Entrypoint of the generated image. When deploying a Job, the command can be templatized by defining params and referencing them in command E.g. python main.py --learning_rate {{learning_rate}} |
| cuda_version | string | false | Version of CUDA Toolkit and CUDNN to install in the image These combinations are based off of publically available docker images on docker hub You can also specify a valid tag of the form {cuda_version_number}-cudnn{cudnn_version_number}-{runtime/devel}-ubuntu{ubuntu_version} Refer https://hub.docker.com/r/nvidia/cuda/tags for valid set of values Note: We use deadsnakes ubuntu ppa to add Python that currently supports only Ubuntu 18.04, 20.04 and 22.04 |
{
"type": "string",
"dockerfile_path": "./Dockerfile",
"build_context_path": "./",
"command": null,
"build_args": {
"property1": "string",
"property2": "string"
}
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=dockerfile |
| dockerfile_path | string | true | The file path of the Dockerfile relative to project root path. |
| build_context_path | string | true | Build context path for the Dockerfile relative to project root path. |
| command | any | false | Override the command to run when the container starts When deploying a Job, the command can be templatized by defining params and referencing them in command E.g. python main.py --learning_rate {{learning_rate}} |
| build_args | object | false | Build arguments to pass todocker build. |
{
"type": "string",
"project_root_path": "./",
"local_build": true
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=local |
| project_root_path | string | true | Local project root path. |
| local_build | boolean | true | run docker build locally |
{
"type": "string",
"repo_url": "string",
"ref": "string",
"branch_name": "string"
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=git |
| repo_url | string | true | The repository URL. |
| ref | string | true | The commit SHA. |
| branch_name | string | false | Selecting branch will select latest commit SHA of the branch. |
{
"type": "string",
"remote_uri": "string"
}
| Name | Type | Required | Description |
|---|---|---|---|
| type | string | true | +value=remote |
| remote_uri | string | true | Remote repository URI |
Was this page helpful?