<commit_before>#!/bin/sh

STORAGE=/home/cloud

BASE_IMAGE=$1

COUNT=$(ls $STORAGE/$BASE_IMAGE.*.qcow2 | wc -l)
IMAGE=$STORAGE/$BASE_IMAGE.$COUNT.qcow2
qemu-img create -f qcow2 -b $STORAGE/$BASE_IMAGE $IMAGE > /dev/null 2>&1

TMP=$PWD/.tmp.job
cat > $TMP <<EOF
universe = vm
vm_type = kvm
vm_memory = 512
kvm_disk = /dev/null:null:null
executable = $BASE_IMAGE
+VM_XML="<domain type='kvm'><name>{NAME}</name><memory>524288</memory><vcpu>1</vcpu><os><type arch='i686' machine='pc-0.11'>hvm</type><boot dev='hd'/></os><features><acpi/><apic/><pae/></features><clock offset='utc'/><on_poweroff>destroy</on_poweroff><on_reboot>restart</on_reboot><on_crash>restart</on_crash><devices><emulator>/usr/bin/qemu-kvm</emulator><disk type='file' device='disk'><source file='$IMAGE'/><target dev='hda' bus='ide'/></disk><interface type='network'><source network='default'/><model type='e1000'/></interface><graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/></devices></domain>"
queue
EOF

condor_submit $TMP 

rm $TMP<commit_msg>Ignore stderr from counting ls in launch_image.sh<commit_after>#!/bin/sh

STORAGE=/home/cloud

BASE_IMAGE=$1

COUNT=$(ls $STORAGE/$BASE_IMAGE.*.qcow2 2> /dev/null | wc -l)
IMAGE=$STORAGE/$BASE_IMAGE.$COUNT.qcow2
qemu-img create -f qcow2 -b $STORAGE/$BASE_IMAGE $IMAGE > /dev/null 2>&1

TMP=$PWD/.tmp.job
cat > $TMP <<EOF
universe = vm
vm_type = kvm
vm_memory = 512
kvm_disk = /dev/null:null:null
executable = $BASE_IMAGE
+VM_XML="<domain type='kvm'><name>{NAME}</name><memory>524288</memory><vcpu>1</vcpu><os><type arch='i686' machine='pc-0.11'>hvm</type><boot dev='hd'/></os><features><acpi/><apic/><pae/></features><clock offset='utc'/><on_poweroff>destroy</on_poweroff><on_reboot>restart</on_reboot><on_crash>restart</on_crash><devices><emulator>/usr/bin/qemu-kvm</emulator><disk type='file' device='disk'><source file='$IMAGE'/><target dev='hda' bus='ide'/></disk><interface type='network'><source network='default'/><model type='e1000'/></interface><graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/></devices></domain>"
queue
EOF

condor_submit $TMP 

rm $TMP
{'fraction_non_alphanumeric': 0.21926910299003322, 'fraction_numerical': 0.02895111532985287, 'mean_word_length': 7.234375, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 86, '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': '1948541', 'n_tokens_mistral': 866, 'n_tokens_neox': 823, 'n_words': 117}