The probably easiest and cleanest way to ssh into a server, spawn an interactive shell and run commands inside that shell is to create a custom rc file for bash.

In your custom bashrc file on the server, first source the default file and then add your custom commands, e.g.

~/.bashrc_custom:

. ~/.bashrc
cd dir/
workon virtualenvproject

You can then start your SSH session like this:

$ ssh -t server "/bin/bash --rcfile ~/.bashrc_custom -i"

The -t option forces a pseudo-tty allocation, so that things like tab-completion work.

The --rcfile option specifies which rcfile to load instead of the default one. Important: you must put "double-dash arguments" on the command line before the single-character options in order to be recognized.