in cdk-project/lib/images/codebuild-image/python/src/notebooks/kernels.py [0:0]
def kernel_image_for(notebook):
"""Get the ECR URI for the kernel image to be used to run a given notebook.
Args:
notebook (Path): The path to the notebook for which to select the kernel image URI.
Returns:
str: The ECR image URI for the kernel to be used to run the notebook.
"""
kernel_type = kernel_type_for(notebook)
if kernel_type == "MXNet":
return MXNET_IMAGE
elif kernel_type == "PyTorch":
return PYTORCH_IMAGE
elif kernel_type == "TensorFlow 1":
return TENSORFLOW_1_IMAGE
elif kernel_type == "TensorFlow 2":
return TENSORFLOW_2_IMAGE
elif kernel_type == "Spark":
return SPARK_IMAGE
elif kernel_type == "R":
return R_IMAGE
return DATA_SCIENCE_IMAGE