Fix docker image build failure
# What does this PR do?

We again get not enough disk size error on docker image build CI. I should try to learn some ways to reduce the size and avoid this error, but this PR fixes this situation in a quick way: install torch/tensorflow before running `pip install .[dev]`, so they are only install once, and we have fewer docker layers produced.
_The documentation is not available anymore as the PR was closed or merged._