The way to activate a virtual environment in a docker container is to export modified PATH and possibly change PYTHONHOME.