pybiolib 1.2.211__py3-none-any.whl → 1.2.218__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- biolib/compute_node/job_worker/executors/docker_executor.py +2 -2
- biolib/compute_node/webserver/webserver.py +6 -2
- biolib/utils/__init__.py +11 -6
- {pybiolib-1.2.211.dist-info → pybiolib-1.2.218.dist-info}/METADATA +1 -1
- {pybiolib-1.2.211.dist-info → pybiolib-1.2.218.dist-info}/RECORD +8 -8
- {pybiolib-1.2.211.dist-info → pybiolib-1.2.218.dist-info}/LICENSE +0 -0
- {pybiolib-1.2.211.dist-info → pybiolib-1.2.218.dist-info}/WHEEL +0 -0
- {pybiolib-1.2.211.dist-info → pybiolib-1.2.218.dist-info}/entry_points.txt +0 -0
@@ -122,7 +122,7 @@ class DockerExecutor:
|
|
122
122
|
time.sleep(5 * retry_count)
|
123
123
|
try:
|
124
124
|
start_time = time.time()
|
125
|
-
if utils.IS_RUNNING_IN_CLOUD
|
125
|
+
if utils.IS_RUNNING_IN_CLOUD:
|
126
126
|
DockerImageCache().get(
|
127
127
|
image_uri=self._absolute_image_uri,
|
128
128
|
estimated_image_size_bytes=estimated_image_size_bytes,
|
@@ -133,7 +133,7 @@ class DockerExecutor:
|
|
133
133
|
try:
|
134
134
|
docker_client.images.get(self._absolute_image_uri)
|
135
135
|
except ImageNotFound:
|
136
|
-
job_uuid = self._options['job']
|
136
|
+
job_uuid = self._options['job']['public_id']
|
137
137
|
docker_client.images.pull(
|
138
138
|
self._absolute_image_uri,
|
139
139
|
auth_config={'username': 'biolib', 'password': f',{job_uuid}'},
|
@@ -19,7 +19,11 @@ from biolib.typing_utils import Optional
|
|
19
19
|
|
20
20
|
app = Flask(__name__)
|
21
21
|
|
22
|
-
|
22
|
+
if utils.IS_RUNNING_IN_CLOUD:
|
23
|
+
_BIOLIB_TMP_DIR = '/biolib/tmp'
|
24
|
+
os.makedirs(_BIOLIB_TMP_DIR, exist_ok=True)
|
25
|
+
else:
|
26
|
+
_BIOLIB_TMP_DIR = tempfile.TemporaryDirectory().name
|
23
27
|
|
24
28
|
|
25
29
|
@app.route('/hello/')
|
@@ -41,7 +45,7 @@ def save_job():
|
|
41
45
|
return jsonify({'job': 'Invalid job'}), 400
|
42
46
|
|
43
47
|
job_id = saved_job['job']['public_id']
|
44
|
-
job_temporary_dir = os.path.join(
|
48
|
+
job_temporary_dir = os.path.join(_BIOLIB_TMP_DIR, job_id)
|
45
49
|
os.makedirs(job_temporary_dir)
|
46
50
|
saved_job['BASE_URL'] = BiolibApiClient.get().base_url
|
47
51
|
saved_job['job_temporary_dir'] = job_temporary_dir
|
biolib/utils/__init__.py
CHANGED
@@ -87,12 +87,17 @@ def _download_chunk(input_tuple: DownloadChunkInputTuple) -> bytes:
|
|
87
87
|
byte_range, presigned_url = input_tuple
|
88
88
|
start, end = byte_range
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
90
|
+
try:
|
91
|
+
response = HttpClient.request(
|
92
|
+
url=presigned_url,
|
93
|
+
headers={'range': f'bytes={start}-{end}'},
|
94
|
+
timeout_in_seconds=300, # timeout after 5 min
|
95
|
+
retries=20,
|
96
|
+
)
|
97
|
+
except Exception as exception:
|
98
|
+
logger_no_user_data.exception("Hit error downloading chunk")
|
99
|
+
logger_no_user_data.error(exception)
|
100
|
+
raise exception
|
96
101
|
logger_no_user_data.debug(f'Returning raw data for part {start}')
|
97
102
|
return response.content
|
98
103
|
|
@@ -78,7 +78,7 @@ biolib/compute_node/job_worker/cache_state.py,sha256=MwjSRzcJJ_4jybqvBL4xdgnDYSI
|
|
78
78
|
biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
|
79
79
|
biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
|
80
80
|
biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
|
81
|
-
biolib/compute_node/job_worker/executors/docker_executor.py,sha256=
|
81
|
+
biolib/compute_node/job_worker/executors/docker_executor.py,sha256=Rt_kpqpBmn6Ut4h-46nqc-g4Qhs4gtbNwEpLiOKOFOM,27939
|
82
82
|
biolib/compute_node/job_worker/executors/docker_types.py,sha256=VhsU1DKtJjx_BbCkVmiPZPH4ROiL1ygW1Y_s1Kbpa2o,216
|
83
83
|
biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
84
|
biolib/compute_node/job_worker/executors/types.py,sha256=yP5gG39hr-DLnw9bOE--VHi-1arDbIYiGuV1rlTbbHI,1466
|
@@ -96,7 +96,7 @@ biolib/compute_node/socket_sender_thread.py,sha256=YgamPHeUm2GjMFGx8qk-99WlZhEs-
|
|
96
96
|
biolib/compute_node/utils.py,sha256=M7i_WTyxbFM3Lri9RWZ_8FeQNYrQIWpKGLfp2I55oeY,4677
|
97
97
|
biolib/compute_node/webserver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
98
98
|
biolib/compute_node/webserver/gunicorn_flask_application.py,sha256=jPfR_YvNBekLUXWo_vHFV-FIwlb8s8tacKmGHvh93qc,914
|
99
|
-
biolib/compute_node/webserver/webserver.py,sha256=
|
99
|
+
biolib/compute_node/webserver/webserver.py,sha256=o4kOAStsqThUtKlnRE-U5TP0JIYntuySDjU7PH310xg,6620
|
100
100
|
biolib/compute_node/webserver/webserver_types.py,sha256=2t8EaFKESnves3BA_NBdnS2yAdo1qwamCFHiSt888nE,380
|
101
101
|
biolib/compute_node/webserver/webserver_utils.py,sha256=XWvwYPbWNR3qS0FYbLLp-MDDfVk0QdaAmg3xPrT0H2s,4234
|
102
102
|
biolib/compute_node/webserver/worker_thread.py,sha256=GRRBUqXdMKvbjyLQhYlqGIbFKeU2iiEXIe5IXi9wgdg,11806
|
@@ -114,14 +114,14 @@ biolib/templates/example_app.py,sha256=EB3E3RT4SeO_ii5nVQqJpi5KDGNE_huF1ub-e5ZFv
|
|
114
114
|
biolib/typing_utils.py,sha256=ntzrlyTkUaO2OtccLYzCAGztGdca0WT5fikJUmSkT-Y,148
|
115
115
|
biolib/user/__init__.py,sha256=Db5wtxLfFz3ID9TULSSTo77csw9tO6RtxMRvV5cqKEE,39
|
116
116
|
biolib/user/sign_in.py,sha256=XTAmRPKfmg7VAaB8cT5wcmfxoPXeHqY8LmDiADF7zbw,2064
|
117
|
-
biolib/utils/__init__.py,sha256=
|
117
|
+
biolib/utils/__init__.py,sha256=rOUFayiY9h23ytSZgCNc7kEHorqFWxvYmt789Zb5mCM,5754
|
118
118
|
biolib/utils/app_uri.py,sha256=Yq_-_VGugQhMMo6mM5f0G9yNlLkr0WK4j0Nrf3FE4xQ,2171
|
119
119
|
biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3100
|
120
120
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
121
121
|
biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
|
122
122
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
123
|
-
pybiolib-1.2.
|
124
|
-
pybiolib-1.2.
|
125
|
-
pybiolib-1.2.
|
126
|
-
pybiolib-1.2.
|
127
|
-
pybiolib-1.2.
|
123
|
+
pybiolib-1.2.218.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
124
|
+
pybiolib-1.2.218.dist-info/METADATA,sha256=j5zDe_qsU-YkwN5wtvp2Sw_B85g67nzkQ7SaU94gn6o,1558
|
125
|
+
pybiolib-1.2.218.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
126
|
+
pybiolib-1.2.218.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
127
|
+
pybiolib-1.2.218.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|