<commit_before>#!/bin/sh

IMAGE=us-docker.pkg.dev/gcpdiag-repo/devel/gcpdiag-hugo:0.1

if [ "$#" -eq 0 ]; then
    ARGS="--themesDir=/themes"
elif [ "$1" = "server" ]; then
    shift
    ARGS="server --themesDir=/themes --bind 0.0.0.0 -b http://localhost:1313 $@"
else
    ARGS="$@ --themesDir=/themes"
fi

mkdir -p "$HOME/.config/gcloud"

[ -t 0 ] && USE_TTY="-it"

docker run $USE_TTY \
  --rm \
  -u "$(id -u):$(id -g)" \
  -e "USER=$(id -n -u)" \
  -e "GROUP=$(id -n -g)" \
  -e "SHELL=/bin/bash" \
  -e HOME -e LANG \
  -v "$(pwd):/src" \
  -v "$HOME/.config/gcloud:$HOME/.config/gcloud" \
  -p 1313:1313 \
  $IMAGE \
  hugo \
  $ARGS<commit_msg>fix running hugo in kokoro<commit_after>#!/bin/sh

IMAGE=us-docker.pkg.dev/gcpdiag-repo/devel/gcpdiag-hugo:0.1

if [ "$#" -eq 0 ]; then
    ARGS="--themesDir=/themes"
elif [ "$1" = "server" ]; then
    shift
    ARGS="server --themesDir=/themes --bind 0.0.0.0 -b http://localhost:1313 $@"
else
    ARGS="$@ --themesDir=/themes"
fi

mkdir -p "$HOME/.config/gcloud"

[ -t 0 ] && USE_TTY="-it"

docker run $USE_TTY \
  --rm \
  -u "$(id -u):$(id -g)" \
  -e "USER=$(id -n -u)" \
  -e "GROUP=$(id -n -g)" \
  -e "SHELL=/bin/bash" \
  -e HOME -e LANG \
  -e GOOGLE_APPLICATION_CREDENTIALS \
  -v "$(pwd):/src" \
  -v "$HOME/.config/gcloud:$HOME/.config/gcloud" \
  -p 1313:1313 \
  $IMAGE \
  hugo \
  $ARGS
{'fraction_non_alphanumeric': 0.24242424242424243, 'fraction_numerical': 0.031042128603104215, 'mean_word_length': 2.3186274509803924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4962182', 'n_tokens_mistral': 675, 'n_tokens_neox': 605, 'n_words': 123}