How to specify requirement for a decord Python library to SageMaker?

The problem has been resolved. The solution is to extend the pre-built container

763104351884.dkr.ecr.us-east-1.amazonaws.com/huggingface-pytorch-inference:2.0.0-transformers4.28.1-cpu-py310-ubuntu20.04

by following the procedure at Extend a Pre-built Container - Amazon SageMaker

The “extension” is just to add RUN pip install decord.

Also ensure the IAM role attached to your Sagemaker notebook has this permission,

AmazonEC2ContainerRegistryFullAccess

If not, proceed to add it.

Once I did these, I was able to predict successfully.