pybiolib 1.1.2229__py3-none-any.whl → 1.1.2234__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.
@@ -7,6 +7,7 @@ class RuntimeJobDataDict(TypedDict):
7
7
  job_uuid: str
8
8
  job_auth_token: str
9
9
  app_uri: str
10
+ is_environment_biolib_cloud: bool
10
11
 
11
12
 
12
13
  class BioLibRuntimeError(Exception):
@@ -14,6 +14,10 @@ class Runtime:
14
14
  def check_is_environment_biolib_app() -> bool:
15
15
  return bool(Runtime._try_to_get_job_data())
16
16
 
17
+ @staticmethod
18
+ def check_is_environment_biolib_cloud() -> bool:
19
+ return Runtime._get_job_data()['is_environment_biolib_cloud']
20
+
17
21
  @staticmethod
18
22
  def get_job_id() -> str:
19
23
  return Runtime._get_job_data()['job_uuid']
@@ -286,6 +286,7 @@ class DockerExecutor:
286
286
  job_uuid=self._options['job']['public_id'],
287
287
  job_auth_token=self._options['job']['auth_token'],
288
288
  app_uri=self._options['job']['app_uri'],
289
+ is_environment_biolib_cloud=bool(utils.IS_RUNNING_IN_CLOUD),
289
290
  )
290
291
  secrets: Dict[str, str] = dict(
291
292
  **module.get('secrets', {}),
@@ -1,3 +1,4 @@
1
+ import base64
1
2
  import io
2
3
  import subprocess
3
4
  import tarfile
@@ -160,6 +161,9 @@ class RemoteHostProxy:
160
161
  access_token = BiolibApiClient.get().access_token
161
162
  bearer_token = f'Bearer {access_token}' if access_token else ''
162
163
 
164
+ biolib_index_basic_auth = f'compute_node|admin:{compute_node_auth_token},{self._job_uuid}'
165
+ biolib_index_basic_auth_base64 = base64.b64encode(biolib_index_basic_auth.encode('utf-8')).decode('utf-8')
166
+
163
167
  nginx_config = f"""
164
168
  events {{
165
169
  worker_connections 1024;
@@ -315,6 +319,13 @@ http {{
315
319
  proxy_ssl_server_name on;
316
320
  }}
317
321
 
322
+ location /proxy/index/ {{
323
+ proxy_pass https://$upstream_hostname$request_uri;
324
+ proxy_set_header authorization "Basic {biolib_index_basic_auth_base64}";
325
+ proxy_set_header cookie "";
326
+ proxy_ssl_server_name on;
327
+ }}
328
+
318
329
  location / {{
319
330
  return 404 "Not found";
320
331
  }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pybiolib
3
- Version: 1.1.2229
3
+ Version: 1.1.2234
4
4
  Summary: BioLib Python Client
5
5
  Home-page: https://github.com/biolib
6
6
  License: MIT
@@ -15,7 +15,7 @@ biolib/_internal/lfs/cache.py,sha256=pQS2np21rdJ6I3DpoOutnzPHpLOZgUIS8TMltUJk_k4
15
15
  biolib/_internal/libs/__init__.py,sha256=Jdf4tNPqe_oIIf6zYml6TiqhL_02Vyqwge6IELrAFhw,98
16
16
  biolib/_internal/libs/fusepy/__init__.py,sha256=AWDzNFS-XV_5yKb0Qx7kggIhPzq1nj_BZS5y2Nso08k,41944
17
17
  biolib/_internal/push_application.py,sha256=b1WvlijJYOLp7f43AoAzjINKkALM9DVB8yfSetEP4Z4,10381
18
- biolib/_internal/runtime.py,sha256=9pZ3s3L7LGxdqOgnHh1KK3Jjyn_9MjhQmKHI-6hMT3U,448
18
+ biolib/_internal/runtime.py,sha256=BiHl4klUHr36MCpqKaUso4idHeBZfPAahLYRQrabFqA,486
19
19
  biolib/_internal/types/__init__.py,sha256=11ZucS8jKeLGAAswXyKI7FH2KLHd6T9Sh8ZK2Ar3jlk,152
20
20
  biolib/_internal/types/app.py,sha256=Mz2QGD_jESX-K9JYnLWPo4YA__Q_1FQQTk9pvidCohU,118
21
21
  biolib/_internal/types/data_record.py,sha256=AHoIiwVqeHj0HozQxFRAyxk-d3XJgLWno4ic1z9eTrQ,865
@@ -23,7 +23,7 @@ biolib/_internal/types/experiment.py,sha256=D94iBdn2nS92lRW-TOs1a2WKXJD5ZtmzL4yp
23
23
  biolib/_internal/types/resource.py,sha256=G-vPkZoe4Um6FPxsQZtRzAlbSW5sDW4NFkbjn21I3V4,372
24
24
  biolib/_internal/types/typing.py,sha256=D4EKKEe7kDx0K6lJi-H_XLtk-8w6nu2fdqn9bvzI-Xo,288
25
25
  biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
26
- biolib/_runtime/runtime.py,sha256=daYxzIpRoW4k-HJFu2BMXeylYSlCXn3-SqdSriCFnKw,2770
26
+ biolib/_runtime/runtime.py,sha256=6eqxOCvnOz3ificmS3wJ05M5xfPwerCEg5ib_gED-kA,2912
27
27
  biolib/api/__init__.py,sha256=mQ4u8FijqyLzjYMezMUUbbBGNB3iFmkNdjXnWPZ7Jlw,138
28
28
  biolib/api/client.py,sha256=FRpdH5aI187b_I_4HUNi680v4iOP65z5f2RcUo8D8MA,3559
29
29
  biolib/app/__init__.py,sha256=cdPtcfb_U-bxb9iSL4fCEq2rpD9OjkyY4W-Zw60B0LI,37
@@ -74,7 +74,7 @@ biolib/compute_node/job_worker/cache_state.py,sha256=MwjSRzcJJ_4jybqvBL4xdgnDYSI
74
74
  biolib/compute_node/job_worker/cache_types.py,sha256=ajpLy8i09QeQS9dEqTn3T6NVNMY_YsHQkSD5nvIHccQ,818
75
75
  biolib/compute_node/job_worker/docker_image_cache.py,sha256=ansHIkJIq_EMW1nZNlW-RRLVVeKWTbzNICYaOHpKiRE,7460
76
76
  biolib/compute_node/job_worker/executors/__init__.py,sha256=bW6t1qi3PZTlHM4quaTLa8EI4ALTCk83cqcVJfJfJfE,145
77
- biolib/compute_node/job_worker/executors/docker_executor.py,sha256=2H7GooL0oAifPcbie0unatB4fRoHyqbsr6S91uagc_g,27952
77
+ biolib/compute_node/job_worker/executors/docker_executor.py,sha256=LcYc4x4-vkmRM1FN1SNj7xRj4qZUNVjQWtgbYMFg3JU,28029
78
78
  biolib/compute_node/job_worker/executors/docker_types.py,sha256=VhsU1DKtJjx_BbCkVmiPZPH4ROiL1ygW1Y_s1Kbpa2o,216
79
79
  biolib/compute_node/job_worker/executors/tars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  biolib/compute_node/job_worker/executors/types.py,sha256=yP5gG39hr-DLnw9bOE--VHi-1arDbIYiGuV1rlTbbHI,1466
@@ -86,7 +86,7 @@ biolib/compute_node/job_worker/large_file_system.py,sha256=XXqRlVtYhs-Ji9zQGIk5K
86
86
  biolib/compute_node/job_worker/mappings.py,sha256=Z48Kg4nbcOvsT2-9o3RRikBkqflgO4XeaWxTGz-CNvI,2499
87
87
  biolib/compute_node/job_worker/utilization_reporter_thread.py,sha256=7tm5Yk9coqJ9VbEdnO86tSXI0iM0omwIyKENxdxiVXk,8575
88
88
  biolib/compute_node/job_worker/utils.py,sha256=wgxcIA8yAhUPdCwyvuuJ0JmreyWmmUoBO33vWtG60xg,1282
89
- biolib/compute_node/remote_host_proxy.py,sha256=V85f4BFGGIS9mPA6W4HLxP8QHPg3MIzKm-awouYy4oo,14671
89
+ biolib/compute_node/remote_host_proxy.py,sha256=ibkWqvLJJHwOM7GzYqJV613QPacU5392vjnDK8BNJIU,15213
90
90
  biolib/compute_node/socker_listener_thread.py,sha256=T5_UikA3MB9bD5W_dckYLPTgixh72vKUlgbBvj9dbM0,1601
91
91
  biolib/compute_node/socket_sender_thread.py,sha256=YgamPHeUm2GjMFGx8qk-99WlZhEs-kAb3q_2O6qByig,971
92
92
  biolib/compute_node/utils.py,sha256=M7i_WTyxbFM3Lri9RWZ_8FeQNYrQIWpKGLfp2I55oeY,4677
@@ -116,8 +116,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
116
116
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
117
117
  biolib/utils/seq_util.py,sha256=ZQFcaE37B2dtucN2zDjOmdya_X0ITc1zBFZJNQY13XA,5183
118
118
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
119
- pybiolib-1.1.2229.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
- pybiolib-1.1.2229.dist-info/METADATA,sha256=1RPPo5D5nB3vkThTXRHq-swafKDQXT4E8ZWJh1-DUys,1508
121
- pybiolib-1.1.2229.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
- pybiolib-1.1.2229.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
- pybiolib-1.1.2229.dist-info/RECORD,,
119
+ pybiolib-1.1.2234.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
120
+ pybiolib-1.1.2234.dist-info/METADATA,sha256=HbKXt5e16DZfNc3y5bAeoEbBg4BgcZkA6ovzvr0WQPM,1508
121
+ pybiolib-1.1.2234.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
122
+ pybiolib-1.1.2234.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
123
+ pybiolib-1.1.2234.dist-info/RECORD,,