forked from wongwill86/air-tasks
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chunkflow Integration and Project overhaul (#2)
* Reorganize chunkflow into a testable plugin * Included testing framework * In-Docker testing with Docker Hub
- Loading branch information
1 parent
77c1650
commit 92353cf
Showing
24 changed files
with
463 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
*.swp | ||
*.pyc | ||
.cache* | ||
.rope* | ||
.tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# air-tasks | ||
|
||
DooD support and AWS ECR Credential Helper | ||
|
||
|
||
NOTES: | ||
Chunkflow: make sure AWS_ACCESS_KEY_ID, etc... are set in environment variables! | ||
docker-compose -f docker/docker-compose.test.yml -p ci build | ||
docker-compose -f docker/docker-compose.test.yml -p ci run --rm sut ptw | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from airflow import DAG | ||
from datetime import datetime, timedelta | ||
from airflow.operators.dummy_operator import DummyOperator | ||
from airflow.operators.chunkflow_plugin import chunkflow_subdag_from_file | ||
# logging.basicConfig(level=logging.INFO) | ||
|
||
DAG_NAME = 'chunkflow_noop' | ||
|
||
TASKS_FILENAME = "./dags/chunkflow/tasks/noop_tasks.txt" | ||
|
||
default_args = { | ||
'owner': 'airflow', | ||
'depends_on_past': False, | ||
'start_date': datetime(2017, 5, 1), | ||
'cactchup_by_default': False, | ||
'retries': 1, | ||
'retry_delay': timedelta(seconds=2), | ||
'retry_exponential_backoff': True, | ||
} | ||
|
||
dag = DAG( | ||
dag_id=DAG_NAME, | ||
default_args=default_args, | ||
schedule_interval=None | ||
) | ||
|
||
start = DummyOperator( | ||
task_id='start', | ||
default_args=default_args, | ||
dag=dag | ||
) | ||
|
||
chunkflow_subdag = chunkflow_subdag_from_file(TASKS_FILENAME, | ||
task_id="noop_tasks", | ||
image_version='raw_json_task', | ||
default_args=default_args, | ||
dag=dag) | ||
|
||
end = DummyOperator(task_id='end', default_args=default_args, dag=dag) | ||
|
||
start.set_downstream(chunkflow_subdag) | ||
chunkflow_subdag.set_downstream(end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use default region: us-east-1 | ||
argDict = Dict{Symbol,Any}(Pair{Symbol,Any}(:shutdown,false),Pair{Symbol,Any}(:workernumber,1),Pair{Symbol,Any}(:workerwaittime,1),Pair{Symbol,Any}(:stride,[1024,1024,128,0]),Pair{Symbol,Any}(:deviceid,nothing),Pair{Symbol,Any}(:queuename,""),Pair{Symbol,Any}(:origin,[10240,10240,1,1]),Pair{Symbol,Any}(:gridsize,[2,2,2,1]),Pair{Symbol,Any}(:task,"test/edges/readnop.json"),Pair{Symbol,Any}(:continuefrom,Int64[])) | ||
PRINT TASK JSONS (no queue has been set) | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[10240,10240,1,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[11264,10240,1,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[10240,11264,1,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[11264,11264,1,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[10240,10240,129,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[11264,10240,129,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[10240,11264,129,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} | ||
{"input":{"kind":"cutoutchunk","params":{"bigArrayType":"s3","origin":[11264,11264,129,1],"chunkSize":[4,4,4],"voxelSize":[4,4,40],"nonzeroRatioThreshold":0.01},"inputs":{"path":"s3://seunglab-test/test_dataset/image/4_4_40/"},"outputs":{"data":"img"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ARG image_name | ||
FROM $image_name | ||
ARG IMAGE_NAME | ||
USER root | ||
COPY docker/scripts/entrypoint-test.sh /entrypoint-test.sh | ||
RUN pip install pytest pytest-watch pytest-env flake8 | ||
USER airflow | ||
ENTRYPOINT ["/entrypoint-test.sh"] |
File renamed without changes.
Oops, something went wrong.