Skip to content
This repository was archived by the owner on Feb 3, 2021. It is now read-only.

Commit c1f43c7

Browse files
authored
Bug: fix aztk cluster submit paths, imports (#464)
* fix cluster submit * add export pythonpath to docker_main
1 parent 2dd7891 commit c1f43c7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

aztk/node_scripts/docker_main.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ echo "Starting setup using Docker"
2929

3030
$(pyenv root)/versions/$AZTK_PYTHON_VERSION/bin/pip install -r $(dirname $0)/requirements.txt
3131
export PYTHONPATH=$PYTHONPATH:$DOCKER_WORKING_DIR
32+
echo 'export PYTHONPATH=$PYTHONPATH:$DOCKER_WORKING_DIR' >> ~/.bashrc
3233

3334
echo "Running main.py script"
3435
$(pyenv root)/versions/$AZTK_PYTHON_VERSION/bin/python $(dirname $0)/main.py install

aztk/node_scripts/submit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import List
88
import azure.storage.blob as blob
99
import azure.batch.models as batch_models
10-
from command_builder import CommandBuilder
10+
from aztk.utils.command_builder import CommandBuilder
1111
from core import config
1212

1313
# limit azure.storage logging

aztk/spark/helpers/submit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ def generate_task(spark_client, container_id, application):
8181
task_cmd.add_option('-e', 'AZ_BATCH_TASK_WORKING_DIR=$AZ_BATCH_TASK_WORKING_DIR')
8282
task_cmd.add_option('-e', 'STORAGE_LOGS_CONTAINER={0}'.format(container_id))
8383
task_cmd.add_argument('spark /bin/bash >> output.log 2>&1')
84-
task_cmd.add_argument('-c "cd $AZ_BATCH_TASK_WORKING_DIR; ' \
84+
task_cmd.add_argument('-c "source ~/.bashrc; '\
85+
'cd $AZ_BATCH_TASK_WORKING_DIR; ' \
8586
'\$(pyenv root)/versions/\$AZTK_PYTHON_VERSION/bin/python ' \
86-
'\$DOCKER_WORKING_DIR/submit.py"')
87+
'\$DOCKER_WORKING_DIR/aztk/node_scripts/submit.py"')
8788

8889
# Create task
8990
task = batch_models.TaskAddParameter(

0 commit comments

Comments
 (0)