pybiolib 1.2.1121__tar.gz → 1.2.1133__tar.gz
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.
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/PKG-INFO +1 -1
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/compute_node_results_proxy.py +56 -7
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/webserver.py +2 -2
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/pyproject.toml +1 -1
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/LICENSE +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/PYPI_README.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_data_record/data_record.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/add_copilot_prompts.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/add_gui_files.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/data_record/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/data_record/data_record.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/data_record/push_data.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/data_record/remote_storage_endpoint.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/errors.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/file_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/fuse_mount/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/fuse_mount/experiment_fuse_mount.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/http_client.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/lfs/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/lfs/cache.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/libs/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/libs/fusepy/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/push_application.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/runtime.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/string_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/instructions/general-app-knowledge.instructions.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/instructions/style-general.instructions.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/instructions/style-python.instructions.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/prompts/biolib_app_inputs.prompt.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/copilot_template/.github/prompts/biolib_run_apps.prompt.md +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/.yarnrc.yml +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/App.tsx +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/Dockerfile +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/index.css +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/index.html +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/index.tsx +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/package.json +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/tsconfig.json +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/vite.config.mts +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/.biolib/config.yml +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/.github/workflows/biolib.yml +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/.gitignore +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/Dockerfile +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/requirements.txt +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/run.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/run.sh +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/templates.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/tree_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/account.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/account_member.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/app.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/data_record.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/experiment.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/file_node.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/push.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/resource.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/resource_permission.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/resource_version.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/result.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/typing.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/types/user.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/utils/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/utils/multinode.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_runtime/runtime.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_session/session.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/api/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/api/client.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/app/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/app/app.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/app/search_apps.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/api_client.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/app_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/auth.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/biolib_app_api.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/biolib_job_api.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/common_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/job_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/lfs_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_api_client/user_state.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/base_bbf_package.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/file_in_container.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/module_input.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/module_output_v2.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/remote_endpoints.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/remote_stream_seeker.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/saved_job.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/stdout_and_stderr.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/system_exception.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/system_status_update.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_binary_format/utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_docker_client/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_download_container.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_errors.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/biolib_logging.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/auth.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/data_record.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/download_container.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/init.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/lfs.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/push.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/run.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/runtime.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/sdk.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/cli/start.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/.gitignore +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/cloud_utils/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/cloud_utils/cloud_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/cache_state.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/cache_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/docker_image_cache.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/docker_executor.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/docker_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/tars/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/job_storage.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/job_worker.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/large_file_system.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/mappings.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/utilization_reporter_thread.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/remote_host_proxy.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/socker_listener_thread.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/socket_sender_thread.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/gunicorn_flask_application.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/proxy_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/webserver_types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/webserver_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/worker_thread.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/experiments/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/experiments/experiment.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/jobs/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/jobs/job.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/jobs/job_result.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/jobs/types.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/py.typed +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/runtime/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/sdk/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/tables.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/typing_utils.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/user/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/user/sign_in.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/utils/__init__.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/utils/app_uri.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/utils/cache_state.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/utils/multipart_uploader.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/utils/seq_util.py +0 -0
- {pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/utils/zip/remote_zip.py +0 -0
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/compute_node_results_proxy.py
RENAMED
@@ -1,32 +1,67 @@
|
|
1
1
|
import io
|
2
|
+
import os
|
2
3
|
import tarfile
|
4
|
+
import threading
|
3
5
|
import time
|
4
6
|
|
5
7
|
from docker.models.containers import Container
|
6
8
|
|
7
9
|
from biolib.biolib_docker_client import BiolibDockerClient
|
8
10
|
from biolib.biolib_errors import BioLibError
|
9
|
-
from biolib.biolib_logging import logger_no_user_data
|
11
|
+
from biolib.biolib_logging import logger, logger_no_user_data
|
10
12
|
from biolib.compute_node.utils import BIOLIB_PROXY_NETWORK_NAME
|
11
|
-
from biolib.typing_utils import Optional
|
12
13
|
from biolib.compute_node.webserver.proxy_utils import get_biolib_nginx_proxy_image
|
14
|
+
from biolib.typing_utils import Optional
|
15
|
+
|
16
|
+
|
17
|
+
class LogStreamingThread(threading.Thread):
|
18
|
+
def __init__(self, container, container_name: str):
|
19
|
+
super().__init__(daemon=True)
|
20
|
+
self._container = container
|
21
|
+
self._container_name = container_name
|
22
|
+
self._stop_event = threading.Event()
|
23
|
+
|
24
|
+
def run(self) -> None:
|
25
|
+
try:
|
26
|
+
logger_no_user_data.debug(f'Starting log streaming for container "{self._container_name}"')
|
27
|
+
log_stream = self._container.logs(follow=True, stream=True)
|
28
|
+
for log_line in log_stream:
|
29
|
+
if self._stop_event.is_set():
|
30
|
+
break
|
31
|
+
if log_line:
|
32
|
+
logger.debug(f'ComputeNodeResultsProxy | {log_line.decode("utf-8", errors="replace").rstrip()}')
|
33
|
+
except Exception as error:
|
34
|
+
logger_no_user_data.debug(f'Log streaming for container "{self._container_name}" ended: {error}')
|
35
|
+
|
36
|
+
def stop(self) -> None:
|
37
|
+
self._stop_event.set()
|
38
|
+
|
13
39
|
|
14
40
|
class ComputeNodeResultsProxy:
|
15
41
|
_instance: Optional['ComputeNodeResultsProxy'] = None
|
16
42
|
|
17
43
|
def __init__(self, tls_pem_certificate_path: str, tls_pem_key_path: str):
|
18
|
-
assert tls_pem_certificate_path,
|
19
|
-
assert tls_pem_key_path,
|
44
|
+
assert tls_pem_certificate_path, 'tls_pem_certificate_path is required'
|
45
|
+
assert tls_pem_key_path, 'tls_pem_key_path is required'
|
20
46
|
self._name = 'biolib-compute-node-results-proxy'
|
21
47
|
self._container: Optional[Container] = None
|
22
48
|
self._docker = BiolibDockerClient().get_docker_client()
|
23
49
|
self._tls_pem_certificate_path = tls_pem_certificate_path
|
24
50
|
self._tls_pem_key_path = tls_pem_key_path
|
51
|
+
self._log_streaming_thread: Optional[LogStreamingThread] = None
|
25
52
|
|
26
53
|
@staticmethod
|
27
54
|
def start_proxy(tls_pem_certificate_path: str, tls_pem_key_path: str) -> None:
|
55
|
+
abs_cert_path = os.path.abspath(tls_pem_certificate_path)
|
56
|
+
abs_key_path = os.path.abspath(tls_pem_key_path)
|
57
|
+
assert os.path.exists(abs_cert_path), f'TLS certificate file does not exist: {abs_cert_path}'
|
58
|
+
assert os.path.exists(abs_key_path), f'TLS key file does not exist: {abs_key_path}'
|
59
|
+
|
28
60
|
if ComputeNodeResultsProxy._instance is None:
|
29
|
-
|
61
|
+
logger_no_user_data.debug(
|
62
|
+
f'Creating ComputeNodeResultsProxy instance with cert: {abs_cert_path}, key: {abs_key_path}'
|
63
|
+
)
|
64
|
+
ComputeNodeResultsProxy._instance = ComputeNodeResultsProxy(abs_cert_path, abs_key_path)
|
30
65
|
ComputeNodeResultsProxy._instance._start() # pylint: disable=protected-access
|
31
66
|
|
32
67
|
@staticmethod
|
@@ -67,6 +102,7 @@ class ComputeNodeResultsProxy:
|
|
67
102
|
self._write_nginx_config_to_container()
|
68
103
|
self._container.start()
|
69
104
|
|
105
|
+
logger_no_user_data.debug(f'Waiting for container "{self._name}" to be ready...')
|
70
106
|
proxy_is_ready = False
|
71
107
|
for retry_count in range(1, 5):
|
72
108
|
time.sleep(0.5 * retry_count)
|
@@ -76,15 +112,27 @@ class ComputeNodeResultsProxy:
|
|
76
112
|
break
|
77
113
|
|
78
114
|
if not proxy_is_ready:
|
115
|
+
logger_no_user_data.error('ComputeNodeResultsProxy did not start properly.')
|
79
116
|
self._terminate()
|
80
117
|
raise Exception('ComputeNodeResultsProxy did not start properly')
|
81
118
|
|
82
119
|
self._container.reload()
|
120
|
+
logger.debug(f'ComputeNodeResultsProxy container "{self._name}" started with ID: {self._container.id}')
|
121
|
+
|
122
|
+
self._log_streaming_thread = LogStreamingThread(self._container, self._name)
|
123
|
+
self._log_streaming_thread.start()
|
124
|
+
logger_no_user_data.debug(f'Started log streaming for container "{self._name}"')
|
83
125
|
|
84
126
|
def _terminate(self):
|
85
|
-
|
86
|
-
|
127
|
+
logger_no_user_data.debug(f'Terminating ComputeNodeResultsProxy container "{self._name}"')
|
128
|
+
if self._log_streaming_thread:
|
129
|
+
self._log_streaming_thread.stop()
|
130
|
+
self._log_streaming_thread = None
|
87
131
|
|
132
|
+
logger.debug(f'Docker container removal temporarily disabled for debugging purposes (container "{self._name}")')
|
133
|
+
# TODO: Figure if we need to remove the container or keep it for debugging purposes
|
134
|
+
# if self._container:
|
135
|
+
# self._container.remove(force=True)
|
88
136
|
|
89
137
|
def _write_nginx_config_to_container(self) -> None:
|
90
138
|
if not self._container:
|
@@ -137,4 +185,5 @@ http {
|
|
137
185
|
|
138
186
|
tarfile_bytes = tarfile_in_memory.getvalue()
|
139
187
|
tarfile_in_memory.close()
|
188
|
+
logger_no_user_data.debug('Writing NGINX configuration to ComputeNodeResultsProxy container')
|
140
189
|
docker.api.put_archive(self._container.id, '/etc/nginx', tarfile_bytes)
|
@@ -154,7 +154,7 @@ def start_webserver(
|
|
154
154
|
|
155
155
|
if utils.IS_RUNNING_IN_CLOUD:
|
156
156
|
try:
|
157
|
-
logger_no_user_data.debug('Stopping ComputeNodeResultsProxy')
|
157
|
+
logger_no_user_data.debug('Stopping ComputeNodeResultsProxy...')
|
158
158
|
ComputeNodeResultsProxy.stop_proxy()
|
159
159
|
except BaseException:
|
160
160
|
logger_no_user_data.exception('Failed to stop ComputeNodeResultsProxy')
|
@@ -192,7 +192,7 @@ def start_webserver(
|
|
192
192
|
|
193
193
|
if biolib_proxy_network:
|
194
194
|
try:
|
195
|
-
logger_no_user_data.debug('Starting ComputeNodeResultsProxy')
|
195
|
+
logger_no_user_data.debug('Starting ComputeNodeResultsProxy...')
|
196
196
|
ComputeNodeResultsProxy.start_proxy(tls_pem_certificate_path, tls_pem_key_path)
|
197
197
|
except BaseException:
|
198
198
|
logger_no_user_data.exception('Failed to start ComputeNodeResultsProxy')
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/data_record/remote_storage_endpoint.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/fuse_mount/experiment_fuse_mount.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/package.json
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/tsconfig.json
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/gui_template/vite.config.mts
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/.biolib/config.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/_internal/templates/init_template/requirements.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/docker_image_cache.py
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/__init__.py
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/docker_executor.py
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/docker_types.py
RENAMED
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/job_worker/executors/tars/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pybiolib-1.2.1121 → pybiolib-1.2.1133}/biolib/compute_node/webserver/gunicorn_flask_application.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|