Customize User-Defined Function Images
TileDB Cloud Self-hosted supports custom Docker images for user-defined functions (UDFs). This page outlines how to set up and configure these custom images.
Build custom Docker images
TileDB Cloud Docker images for UDFs have several required packages and ENTRYPOINT
scripts. As a result, you must base your custom Docker images on the official TileDB Cloud Docker image.
The following are the default image names available:
Image | Image Name |
---|---|
Base Python image | tiledbenterprise/rest-python-udf-3.9 |
Geospatial packages | tiledbenterprise/rest-python-udf-geo-3.9 |
Biomedical Imaging | tiledbenterprise/rest-python-udf-imaging |
Vector Search | tiledbenterprise/rest-python-udf-vectorsearch |
Image | Image Name |
---|---|
Base R image | tiledbenterprise/rest-r-udf |
The specific tag that is available depends on the version of TileDB Cloud you are deploying. To get access to the correct Docker image for your installation, contact your account representative.
Use the base image in a Dockerfile
FROM tiledbenterprise/rest-python-udf-3.9:2.23.0
# mamba install custom packages
RUN mamba install -c conda-forge my_packages
Host custom Docker images
The images need to be hosted in a place that is accessible to the kubernetes cluster. For an example of hosting Docker images using ECR, visit Configure AWS ECR container registry for UDF images.
Configure custom images
After you have built the Docker images, you can add them to your values.yaml
by adding a section.
tiledb-cloud-rest:
restConfig:
UDF:
Images:
# Make sure tiledb-rest.yaml.example and chart/tiledb-cloud-rest/values.yaml
# stay in sync with each other.
"python":
# Python UDFs must be run with a version compatible with the one that
# serialized ("pickled") the function, so images must be available
# for all Python client versions you want to support.
- Versions: ["3.8", "3.9"] # mutually function-pickle–compatible
CustomImages:
"my_python_image": "custom_python_docker_image"
- Versions: ["3.10"]
CustomImages:
"my_python_image": "custom_python_docker_image"
"r":
# R is largely compatible across versions.
# "*" denotes a fallback, i.e., it will be used for *any* version
# not present in other ImageSets (which in this case is all versions).
- Versions: ["*"]
CustomImages:
"my_r_image": "custom_r_docker_image"