<commit_before>machine:
  services:
    - docker
  pre:
    - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
    - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
    - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
    - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
    - sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.0-circleci'
    - sudo chmod 0755 /usr/bin/docker
    - sudo wget https://github.com/jwilder/docker-squash/releases/download/v0.2.0/docker-squash-linux-amd64-v0.2.0.tar.gz
    - sudo tar -C /usr/local/bin -xzvf docker-squash-linux-amd64-v0.2.0.tar.gz

test:
  override:
    - docker build -t "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM-layered" .

deployment:
  production:
    branch: master
    commands:
      - docker login -e "$DOCKER_EMAIL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
      - docker save "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM-layered" > layered.tar
      - docker-squash -i layered.tar -o squashed.tar -t "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM"
      - cat squashed.tar | docker load
      - docker push "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM"
<commit_msg>Debugging<commit_after>machine:
  services:
    - docker
  pre:
    - tar --version
    - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
    - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
    - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
    - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
    - sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.0-circleci'
    - sudo chmod 0755 /usr/bin/docker
    - sudo wget https://github.com/jwilder/docker-squash/releases/download/v0.2.0/docker-squash-linux-amd64-v0.2.0.tar.gz
    - sudo tar -C /usr/local/bin -xzvf docker-squash-linux-amd64-v0.2.0.tar.gz

test:
  override:
    - docker build -t "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM-layered" .

deployment:
  production:
    branch: master
    commands:
      - docker login -e "$DOCKER_EMAIL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
      - docker save "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM-layered" > layered.tar
      - docker-squash -i layered.tar -o squashed.tar -t "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM"
      - cat squashed.tar | docker load
      - docker push "66pix/nginx-pagespeed:$CIRCLE_BUILD_NUM"

{'fraction_non_alphanumeric': 0.15350877192982457, 'fraction_numerical': 0.03668261562998405, 'mean_word_length': 2.7391952309985097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3563288', 'n_tokens_mistral': 1080, 'n_tokens_neox': 973, 'n_words': 178}