forked from ngageoint/hootenanny
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerBuild_HootCore.txt
More file actions
executable file
·98 lines (54 loc) · 2.24 KB
/
DockerBuild_HootCore.txt
File metadata and controls
executable file
·98 lines (54 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Build a Very Limited Hootenanny core-only Docker image for GBDX
TODO:
* Merge the build and install into the Dockerfile
Steps:
* cd to the hoot directory
* Build a Centos7 image with all of the stuff we need:
docker build --rm -t rawhoot ./docker/hootcore/
* Run the image and mount this directory in it:
docker run --rm -v $(pwd):/root/hoot -it rawhoot
* Inside the container:
cd ~/hoot
# Build Hootenanny
./docker/hootcore/HootCore_01_Build.sh
# Install Hootenanny in /var/lib/hootenanny
./docker/hootcore/HootCore_02_Install.sh
* Check that Hoot was installed and the tests run cleanly.
# NOTE: There is a failure with one of the print tests. I can't figure out
# what the difference in the test output is but Hoot complains.
cd /var/lib/hootenanny
HootTest --slow --diff
# Cleanup the image and remove packages that we don't need
# NOTE: This also removes the Hoot test-files and test-output
./docker/hootcore/HootCore_03_Cleanup.sh
* Then ctrl-p ctrl-q to get out
* Get the container ID
docker ps
* Commit the changes to a new image
docker commit -m "Hoot for GBDX" <container ID> <Docker Username>/hootcore:<version>
* You can now go back into the container and stop it
docker attach <container ID>
CTRL-D
NOTE: Create a version and then a "latest" image
# docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
docker tag <Docker Username>/hootcore:<version> <Docker Username>/hootcore:latest
* Push the image upto the Docker repo
docker push <Docker Username>/hootcore:latest
docker push <Docker Username>/hootcore:<version>
VERY IMPORTANT NOTE: When the Docker image changes, YOU MUST UPDATE THE GBDX TASK VERSION
If you don't, GBDX WILL NOT load the new docker image.
* Em Tasol
##### Testing the image #####
* The python processing script expects to see this directory structure:
/mnt/work/
input/geojson
output
* Create a "test" directory that can be mounted onto the image:
mkdir -p test/input/geojson
mkdir -p test/output
* Copy whatever data you are testing with into the input/geojson directory.
* Mount the directory onto the image:
docker run --rm -v $(pwd)/test:/mnt/work -it <Docker Username>/hootcore:latest
* Inside the container, run the processing script:
python /hoot-gbdx.py
NOTE: You can also run Hoot directly if needed.