I use Pycharm's native ssh interpreter toolhttps://www.jetbrains.com/help/pycharm/configuring-remote-in...
It automatically syncs your local project with the remote machine and runs seamlessly. They have a similar offering for docker, but I have yet to try it when running over ssh.