Make install docker friendly (#1830)
* Add venv to gitignore
* This is a fairly standard place to put a virtual
env so make sure it doesn’t show up in git.
* Only read INSTALL_DIR if it is not an env var
* Allow people to specify the INSTALL_DIR from
outside the script as an environment variable.
* This makes the install script more automatable
as it allows for predefined arguments to be used
before reading the answer from the user.
* Allow user to specify SUDO_CMD
* This allows sudo to be used as a default.
* Allows container users who may not have sudo the
ability to turn this part of the install script
off via an environment variable.
* Downgrade docker running to a warning
* In docker systems you wouldn’t have docker
running while installing cog
* Warn the user instead of treating this like a
critical failure.
* This might be better moving into the binary
itself.
* Update docs to show docker install instructions
* This is a bit fragile given that this won’t be
valid until the next release.
* Use SUDO instead of SUDO_CMD
* Update all the code paths for $SUDO
* Check whether $SUDO is set and not empty
* Empty is a valid state for $SUDO to be in, so we
need to explicitly check whether it is set and not
just empty or unset.
---------
Co-authored-by: Mattt Zmuda <mattt@replicate.com>