Also note it works a little differently now in the updated script. It will create an $HOME/UBports directory on the host which it will mount as the $HOME in the container. It also symlinks any ssh keys you might have on the host and copies over the .gitconfig. This way it keeps the container home seperate from host but can easily be accessed on the host. If you want to change the directory used for the container you can do
export UBPORTS_HOME=$HOME/Custom/Path
./ubports-sdk-setup -d