1Docker 2====== 3 4Docker files to ease working with PathKit and CanvasKit. 5 6emsdk-base 7---------- 8 9This image has an Emscripten SDK environment that can be used for 10compiling projects (e.g. Skia's PathKit) to WASM/asm.js. 11 12This image tracks the official emscripten Docker image and installs 13python 2 (which some of our scripts still use). 14 15 make publish_emsdk_base 16 17For testing the image locally, the following flow can be helpful: 18 19 docker build -t emsdk-base ./emsdk-base/ 20 # Run bash in it to poke around and make sure things are properly installed 21 docker run -it emsdk-base /bin/bash 22 # Compile PathKit with the local image 23 docker run -v $SKIA_ROOT:/SRC -v $SKIA_ROOT/out/dockerpathkit:/OUT emsdk-base /SRC/infra/pathkit/build_pathkit.sh 24 25karma-chrome-tests 26------------------ 27 28This image has Google Chrome and karma/jasmine installed on it, which can 29be used to run JS tests. 30 31This image is standalone and does not have any extra dependencies that make 32it Skia-exclusive. 33 34It gets manually pushed anytime there's an update to the Dockerfile or relevant 35installed libraries. 36 37 make publish_karma_chrome_tests 38 39Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 40using the default Docker settings. To be safe, it is recommended to run the container 41with the flag --shm-size=2gb. 42 43For testing the image locally, the following can be helpful: 44 45 docker build -t karma-chrome-tests ./karma-chrome-tests/ 46 # Run bash in it to poke around and make sure things are properly installed 47 docker run -it --shm-size=2gb karma-chrome-tests /bin/bash 48 # Run the tests (but not capturing Gold output) with the local source repo 49 docker run --shm-size=2gb -v $SKIA_ROOT:/SRC karma-chrome-tests karma start /SRC/infra/pathkit/karma-docker.conf.js --single-run 50 51gold-karma-chrome-tests 52------------------ 53 54This image has Google Chrome and karma/jasmine installed on it, which can 55be used to run JS tests. 56 57This image assumes the runner wants to collect the output images and JSON data 58specific to Skia Infra's Gold tool (image correctness). 59 60It gets manually pushed anytime there's an update to the Dockerfile or the parent 61image (karma-chrome-tests). 62 63 # Run the following from $SKIA_ROOT/infra/pathkit 64 make publish_gold_karma_chrome_tests 65 66Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 67using the default Docker settings. To be safe, it is recommended to run the container 68with the flag --shm-size=2gb. 69 70For testing the image locally, the following can be helpful: 71 72 # Run the following from $SKIA_ROOT/infra/pathkit 73 make gold-docker-image 74 # Run bash in it to poke around and make sure things are properly installed 75 docker run -it --shm-size=2gb gold-karma-chrome-tests /bin/bash 76 # Run the tests and collect Gold output with the local source repo 77 mkdir -p -m 0777 /tmp/dockergold 78 docker run --shm-size=2gb -v $SKIA_ROOT:/SRC -v /tmp/dockergold:/OUT gold-karma-chrome-tests /SRC/infra/pathkit/test_pathkit.sh 79 80perf-karma-chrome-tests 81------------------ 82 83This image has Google Chrome and karma/jasmine installed on it, which can 84be used to run JS tests. 85 86This image assumes the runner wants to collect the output images and JSON data 87specific to Skia Infra's Perf tool. 88 89It gets manually pushed anytime there's an update to the Dockerfile or the parent 90image (karma-chrome-tests). 91 92 # Run the following from $SKIA_ROOT/infra/pathkit 93 make publish_perf_karma_chrome_tests 94 95Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when 96using the default Docker settings. To be safe, it is recommended to run the container 97with the flag --shm-size=2gb. 98 99For testing the image locally, the following can be helpful: 100 101 # Run the following from $SKIA_ROOT/infra/pathkit 102 make perf-docker-image 103 # Run bash in it to poke around and make sure things are properly installed 104 docker run -it --shm-size=2gb perf-karma-chrome-tests /bin/bash 105 # Run the tests and collect Perf output with the local source repo 106 mkdir -p -m 0777 /tmp/dockerperf 107 docker run --shm-size=2gb -v $SKIA_ROOT:/SRC -v /tmp/dockerperf:/OUT perf-karma-chrome-tests /SRC/infra/pathkit/perf_pathkit.sh 108