Commit 33d3689
Benjamin Moody
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.
Installation may produce a lot of output (e.g. when compiling
extension modules from source), so store the log in the installation
directory rather than further cluttering update.log.
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.1 parent 3e1e03d commit 33d3689
1 file changed
+24
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
| 83 | + | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
| 100 | + | |
| 101 | + | |
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
| |||
98 | 109 | | |
99 | 110 | | |
100 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
101 | 117 | | |
0 commit comments