diff --git a/fri/server/main.py b/fri/server/main.py index fa09a18..5939f5a 100644 --- a/fri/server/main.py +++ b/fri/server/main.py @@ -166,14 +166,19 @@ def getFilesList(dir): concore_path = os.path.abspath(os.path.join(cur_path, '../../')) dir_path = os.path.abspath(os.path.join(concore_path, dir)) res = [] - - if(dir=='concore'): - res = os.listdir(concore_path) - else: - res = os.listdir(dir_path) + res = os.listdir(dir_path) res2 = json.dumps(res) return res2 +@app.route('/openJupyter/', methods=['POST']) +def openJupyter(): + cur_path = os.getcwd() + concore_path = os.path.abspath(os.path.join(cur_path, '../../')) + p = call(["jupyter", "lab"], cwd=concore_path) + return p + + + if __name__ == "__main__": app.run(host="0.0.0.0") diff --git a/fri/test.py b/fri/test.py index 8384597..fab03e7 100644 --- a/fri/test.py +++ b/fri/test.py @@ -64,10 +64,14 @@ def destroy(): print(response.text) def getFilesList(): - import requests url = "http://127.0.0.1:5000/getFilesList/test" response = requests.request("POST", url) - print(response.text) + print(response.text) + +def openJupyter(): + url = "http://127.0.0.1:5000/openJupyter" + response = requests.request("POST", url) + print(response.text) # upload() @@ -77,4 +81,5 @@ def getFilesList(): # debug() # destroy() getFilesList() +# openJupyter() diff --git a/mkconcore.py b/mkconcore.py index 4332f23..8937b3c 100644 --- a/mkconcore.py +++ b/mkconcore.py @@ -683,6 +683,8 @@ #start running source in associated dirs (run and debug scripts) if concoretype=="posix": fdebug.write('#!/bin/bash' + "\n") + frun.write('#!/bin/bash' + "\n") + i=0 for node in nodes_dict: @@ -826,6 +828,9 @@ i=i+1 fmaxtime.close() +if concoretype=="posix": + funlock.write('#!/bin/bash' + "\n") + i=0 # 9/12/21 for node in nodes_dict: containername,sourcecode = nodes_dict[node].split(':')