Skip to content

Commit

Permalink
Fix python paths
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierCLL committed Aug 23, 2023
1 parent 32130ec commit 18f876c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@
# systemctl status firewalld
# systemctl stop firewalld

import os
from dask.distributed import Client, SSHCluster

# add project dir to pythonpath
project_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
if project_dir not in os.sys.path:
os.sys.path.append(project_dir)

# get the password from environment variable
import os
password = os.environ.get('PASSWORD')

from stack_composed import stack_composed
from stack_composed import stack_composed_main

# Create a list of addresses for your servers
addresses = ['192.168.106.12', '192.168.106.13']
Expand All @@ -39,7 +44,7 @@
client = Client(cluster)

# Perform computations using the Dask client
stack_composed.cli()
stack_composed_main.cli()

# Close the client and cluster when done
client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
from dask.diagnostics import ProgressBar
warnings.filterwarnings('ignore')

# add project dir to pythonpath
project_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
if project_dir not in os.sys.path:
os.sys.path.append(project_dir)

from stack_composed import header
from stack_composed.image import Image
from stack_composed.stats import statistic
Expand Down

0 comments on commit 18f876c

Please sign in to comment.