Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: install python libraries atomically.
We want to avoid "upgrading" python libraries using pip, because this may not give predictable results, and if installation fails it can leave the system in a broken half-installed state. Consequently, instead of installing packages into /physionet/python-env/physionet, install them into a directory named for the MD5 hash of requirements.txt. After the pip command is successful, copy 'requirements.txt' to a new file 'installed.txt'. This serves as a flag to indicate that the packages were installed successfully, and also provides documentation of what was supposedly installed. If 'requirements.txt' matches 'installed.txt', then we know that we don't need to reinstall anything. After the packages have been successfully installed and we have tested that they're working (at least well enough to invoke getmigrationtargets), then update the symlink /physionet/python-env/physionet to point to the new prefix.
- Loading branch information