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

Commit

Permalink
Bug: fix aztk cluster submit paths, imports (#464)
Browse files Browse the repository at this point in the history
* fix cluster submit

* add export pythonpath to docker_main
  • Loading branch information
jafreck authored Mar 27, 2018
1 parent 2dd7891 commit c1f43c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions aztk/node_scripts/docker_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ echo "Starting setup using Docker"

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

echo "Running main.py script"
$(pyenv root)/versions/$AZTK_PYTHON_VERSION/bin/python $(dirname $0)/main.py install
Expand Down
2 changes: 1 addition & 1 deletion aztk/node_scripts/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import List
import azure.storage.blob as blob
import azure.batch.models as batch_models
from command_builder import CommandBuilder
from aztk.utils.command_builder import CommandBuilder
from core import config

# limit azure.storage logging
Expand Down
5 changes: 3 additions & 2 deletions aztk/spark/helpers/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ def generate_task(spark_client, container_id, application):
task_cmd.add_option('-e', 'AZ_BATCH_TASK_WORKING_DIR=$AZ_BATCH_TASK_WORKING_DIR')
task_cmd.add_option('-e', 'STORAGE_LOGS_CONTAINER={0}'.format(container_id))
task_cmd.add_argument('spark /bin/bash >> output.log 2>&1')
task_cmd.add_argument('-c "cd $AZ_BATCH_TASK_WORKING_DIR; ' \
task_cmd.add_argument('-c "source ~/.bashrc; '\
'cd $AZ_BATCH_TASK_WORKING_DIR; ' \
'\$(pyenv root)/versions/\$AZTK_PYTHON_VERSION/bin/python ' \
'\$DOCKER_WORKING_DIR/submit.py"')
'\$DOCKER_WORKING_DIR/aztk/node_scripts/submit.py"')

# Create task
task = batch_models.TaskAddParameter(
Expand Down

0 comments on commit c1f43c7

Please sign in to comment.