<commit_before>#!/bin/bash

ENV_VARS=(
  ID
  LASP_BRANCH
  DCOS
  TOKEN
  ELB_HOST
  AWS_ACCESS_KEY_ID
  AWS_SECRET_ACCESS_KEY
  CLIENT_NUMBER
  PARTITION_PROBABILITY
  IMPRESSION_VELOCITY
)

for ENV_VAR in "${ENV_VARS[@]}"
do
  if [ -z "${!ENV_VAR}" ]; then
    echo ">>> ${ENV_VAR} is not configured; please export it."
    exit 1
  fi
done

echo ">>> Configuring Runner"
cd /tmp

# Memory of VM.
MEMORY=512.0

# CPU of VM.
CPU=0.5

cat <<EOF > dcos-runner.json
{
  "acceptedResourceRoles": [
    "slave_public"<commit_msg>Simplify start-dcos-runner.sh; assumes 'dcos auth login'<commit_after>#!/bin/bash

DCOS=$(dcos config show core.dcos_url)
TOKEN=$(dcos config show core.dcos_acs_token)

ENV_VARS=(
  ID
  LASP_BRANCH
  ELB_HOST
  AWS_ACCESS_KEY_ID
  AWS_SECRET_ACCESS_KEY
  CLIENT_NUMBER
  PARTITION_PROBABILITY
  IMPRESSION_VELOCITY
)

for ENV_VAR in "${ENV_VARS[@]}"
do
  if [ -z "${!ENV_VAR}" ]; then
    echo ">>> ${ENV_VAR} is not configured; please export it."
    exit 1
  fi
done

echo ">>> Configuring Runner"
cd /tmp

# Memory of VM.
MEMORY=512.0

# CPU of VM.
CPU=0.5

cat <<EOF > dcos-runner.json
{
  "acceptedResourceRoles": [
    "slave_public"
{'fraction_non_alphanumeric': 0.1234991423670669, 'fraction_numerical': 0.012006861063464836, 'mean_word_length': 3.7827868852459017, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7115339', 'n_tokens_mistral': 502, 'n_tokens_neox': 489, 'n_words': 112}