<commit_before>#!/usr/bin/env bash

# We are running as root - run as our worker user instead

sudo -iu worker bash <<"EOF"
cd
# Fetch the worker script
# TODO: This is in GCloud right now, but we should use Git when we go public
gsutil cp gs://dml339-test-worker-storage/worker.tgz .

tar xvzf worker.tgz
cd Halite/apiserver/worker

# Grab configuration values
python3 grab_config.py

# Start the worker
screen -S worker -d -m /bin/bash -c "python3 worker.py"
EOF<commit_msg>Compile Halite environment when setting up worker<commit_after>#!/usr/bin/env bash

# We are running as root - run as our worker user instead

sudo -iu worker bash <<"EOF"
cd
# Fetch the worker script
# TODO: This is in GCloud right now, but we should use Git when we go public
gsutil cp gs://dml339-test-worker-storage/worker.tgz .

tar xvzf worker.tgz

cd Halite/environment
make -j2

cd ../apiserver/worker

# Grab configuration values
python3 grab_config.py

# Start the worker
screen -S worker -d -m /bin/bash -c "python3 worker.py"
EOF
{'fraction_non_alphanumeric': 0.08849557522123894, 'fraction_numerical': 0.010816125860373648, 'mean_word_length': 3.6912442396313363, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '7573752', 'n_tokens_mistral': 353, 'n_tokens_neox': 332, 'n_words': 139}