Using any other docker image we can easily install extra packages by running a command: sudo pip3 install XX
and then it would be available in the python environment.
However, in Cortexm image installing the package with sudo pip3 install or pip3 install --user would end up in a different python env. My guess is because of this line that we have for cortexm and riscv images:
https://github.com/apache/tvm/blob/main/docker/Dockerfile.ci_cortexm#L37
https://github.com/apache/tvm/blob/main/docker/Dockerfile.ci_riscv#L37
cc @areusch