Skip to content

Commit

Permalink
chore: format bootstrap_pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
qgerome committed Apr 5, 2024
1 parent c9b839e commit 8582c1f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions images/base/files/scripts/bootstrap_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def configure_cloud_run():

print("Downloading pipeline...")
os.mkdir("pipeline")

download_pipeline(
server_url,
access_token,
Expand Down Expand Up @@ -79,7 +80,9 @@ def version_info():
installed = []
uninstalled = []
for lib in ["openhexa.sdk", "openhexa.toolbox"]:
completed_process = subprocess.run(f"pip freeze | grep {lib}", shell=True, capture_output=True)
completed_process = subprocess.run(
f"pip freeze | grep {lib}", shell=True, capture_output=True
)
lib_version = completed_process.stdout.decode("utf-8").strip()
if lib_version == "":
uninstalled.append(lib)
Expand All @@ -101,10 +104,14 @@ def version_info():
configure_cloud_run()

if args.command in ("cloudrun", "run"):
args_config = json.loads(base64.b64decode(args.config).decode("utf-8")) if args.config else {}
args_config = (
json.loads(base64.b64decode(args.config).decode("utf-8"))
if args.config
else {}
)
run_pipeline(args_config)
if args.command == "cloudrun" and os.path.exists(
"/home/jovyan/.hexa_scripts/fuse_umount.py"
"/home/jovyan/.hexa_scripts/fuse_umount.py"
):
# clean up fuse & umount at the end
import fuse_umount # noqa: F401, E402
Expand Down

0 comments on commit 8582c1f

Please sign in to comment.