Home | History | Annotate | only in /external/skia/infra/lottiecap/docker
Up to higher level directory
NameDateSize
gold-lottie-web-puppeteer/22-Oct-2020
lottie-web-puppeteer/22-Oct-2020
lottiecap_gold.sh22-Oct-20201.5K
README.md22-Oct-20203.1K

README.md

      1 Docker
      2 ======
      3 
      4 Docker files to handle Gold + lottie-web integration
      5 
      6 
      7 lottie-web-puppeteer
      8 --------------------
      9 
     10 This image has Google Chrome, [puppeteer](https://github.com/GoogleChrome/puppeteer),
     11 and a few other tools for automating web-browser tests.
     12 
     13 This image is standalone and does not have any extra dependencies that make
     14 it Skia-exclusive.
     15 
     16 It gets manually pushed anytime there's an update to the Dockerfile or relevant
     17 installed libraries.
     18 
     19     docker build -t lottie-web-puppeteer ./lottie-web-puppeteer/
     20     LOTTIE_VERSION="v2"  # use v1, v2, etc for any re-spins of the container.
     21     docker tag lottie-web-puppeteer gcr.io/skia-public/lottie-web-puppeteer:$LOTTIE_VERSION
     22     docker push gcr.io/skia-public/lottie-web-puppeteer:$LOTTIE_VERSION
     23 
     24 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when
     25 using the default Docker settings.  To be safe, it is recommended to run the container
     26 with the flag --shm-size=2gb.
     27 
     28 For testing the image locally, the following can be helpful:
     29 
     30     docker build -t lottie-web-puppeteer ./lottie-web-puppeteer/
     31     # Run bash in it to poke around and make sure things are properly installed
     32     docker run -it --shm-size=2gb lottie-web-puppeteer /bin/bash
     33     # Create a screenshot of a single .json file which will be put in
     34     # $SKIA_ROOT/tools/lottiecap/docker_strip.png
     35     docker run -it -v $SKIA_ROOT:/SRC -v ~/lottie-samples:/LOTTIE_FILES -v $LOTTIE_ROOT/build/player:/LOTTIE_BUILD -w /SRC/tools/lottiecap lottie-web-puppeteer node /SRC/tools/lottiecap/lottiecap.js --input /LOTTIE_FILES/body_movin.json --lottie_player /LOTTIE_BUILD/lottie.min.js --in_docker --output docker_strip.png
     36 
     37 gold-lottie-web-puppeteer
     38 -------------------------
     39 
     40 This image has Google Chrome, [puppeteer](https://github.com/GoogleChrome/puppeteer),
     41 and a few other tools for automating web-browser tests.
     42 
     43 This image assumes the runner wants to collect the output images and JSON data
     44 specific to Skia Infra's Gold tool (image correctness).
     45 
     46 It gets manually pushed anytime there's an update to the Dockerfile or relevant
     47 installed libraries.
     48 
     49     # Run the following from $SKIA_ROOT/infra/pathkit
     50     make gold-docker-image
     51     LOTTIE_VERSION="v2"  # use v1, v2, etc for any re-spins of the container.
     52     docker tag gold-lottie-web-puppeteer gcr.io/skia-public/gold-lottie-web-puppeteer:$LOTTIE_VERSION
     53     docker push gcr.io/skia-public/gold-lottie-web-puppeteer:$LOTTIE_VERSION
     54 
     55 
     56 Of note, some versions (generally before Chrome 60) run out of space on /dev/shm when
     57 using the default Docker settings.  To be safe, it is recommended to run the container
     58 with the flag --shm-size=2gb.
     59 
     60 For testing the image locally, the following can be helpful:
     61 
     62     # Run the following from $SKIA_ROOT/infra/pathkit
     63     make gold-docker-image
     64     docker run -it --shm-size=2gb gold-lottie-web-puppeteer /bin/bash
     65     # Collect the gold output with the local source repo and *all* of the files
     66     # from lottie-samples
     67     mkdir -p -m 0777 /tmp/dockerout
     68     docker run -v ~/lottie-samples:/LOTTIE_FILES -v $SKIA_ROOT:/SRC -v $LOTTIE_ROOT/build/player:/LOTTIE_BUILD -v /tmp/dockerout:/OUT gold-lottie-web-puppeteer /SRC/infra/lottiecap/docker/lottiecap_gold.sh