<commit_before>#!/bin/bash

ENV_VARS=(
  DCOS
  TOKEN
  EVALUATION_PASSPHRASE
  ELB_HOST
  PEER_SERVICE
  MODE
  BROADCAST
  SIMULATION
  EVAL_ID
  EVAL_TIMESTAMP
  CLIENT_NUMBER
  HEAVY_CLIENTS
  PARTITION_PROBABILITY
  AAE_INTERVAL
  DELTA_INTERVAL
  INSTRUMENTATION
  AWS_ACCESS_KEY_ID
  AWS_SECRET_ACCESS_KEY
)

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 ">>> Beginning deployment!"

echo ">>> Configuring Lasp"
cd /tmp

# Memory of each VM.
MEMORY=120.0

cat <<EOF > lasp-server.json
{
  "acceptedResourceRoles": [
    "slave_public"
  ],
  "id": "lasp-server",
  "dependencies": [],
  "constraints": [["hostname", "UNIQUE", ""]],
  "cpus": 1.0,
  "mem": $MEMORY,
  "instances": 1,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "cmeiklejohn/lasp-dcos",
      "network": "HOST",
      "forcePullImage": true,
      "parameters": [
        { "key": "oom-kill-disable", "value": "true" }
      ]
    }
  },
  "ports": [0, 0],
  "env": {<commit_msg>Increase required memory.<commit_after>#!/bin/bash

ENV_VARS=(
  DCOS
  TOKEN
  EVALUATION_PASSPHRASE
  ELB_HOST
  PEER_SERVICE
  MODE
  BROADCAST
  SIMULATION
  EVAL_ID
  EVAL_TIMESTAMP
  CLIENT_NUMBER
  HEAVY_CLIENTS
  PARTITION_PROBABILITY
  AAE_INTERVAL
  DELTA_INTERVAL
  INSTRUMENTATION
  AWS_ACCESS_KEY_ID
  AWS_SECRET_ACCESS_KEY
)

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 ">>> Beginning deployment!"

echo ">>> Configuring Lasp"
cd /tmp

# Memory of each VM.
MEMORY=500.0

cat <<EOF > lasp-server.json
{
  "acceptedResourceRoles": [
    "slave_public"
  ],
  "id": "lasp-server",
  "dependencies": [],
  "constraints": [["hostname", "UNIQUE", ""]],
  "cpus": 1.0,
  "mem": $MEMORY,
  "instances": 1,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "cmeiklejohn/lasp-dcos",
      "network": "HOST",
      "forcePullImage": true,
      "parameters": [
        { "key": "oom-kill-disable", "value": "true" }
      ]
    }
  },
  "ports": [0, 0],
  "env": {
{'fraction_non_alphanumeric': 0.16224862888482633, 'fraction_numerical': 0.009140767824497258, 'mean_word_length': 3.2096153846153848, 'pattern_counts': {'":': 36, '<': 7, '<?xml version=': 0, '>': 23, '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': '5959162', 'n_tokens_mistral': 929, 'n_tokens_neox': 899, 'n_words': 182}