<commit_before>$TOKEN=(cat C:\vagrant\config\swarm-token)
$ip=( (Get-NetIPAddress | Where-Object -FilterScript { $_.InterfaceAlias -Eq "Ethernet 2" } | select-object IPAddress)[1].IPAddress)

if (! $ip) {
  $ip=( (Get-NetIPAddress | Where-Object -FilterScript { $_.InterfaceAlias -Eq "Ethernet1" } | select-object IPAddress)[1].IPAddress)  
}
Write-Host "Adding host $($ip):2375 to swarm"
docker run --restart=always -d stefanscherer/swarm-windows:1.2.5 join "--addr=$($ip):2375" "token://$TOKEN"<commit_msg>Improve filtering IP address<commit_after>$TOKEN=(cat C:\vagrant\config\swarm-token)
$ip=(Get-NetIPAddress -AddressFamily IPv4 `
   | Where-Object -FilterScript { $_.InterfaceAlias -Ne "vEthernet (HNS Internal NIC)" } `
   | Where-Object -FilterScript { $_.IPAddress -Ne "127.0.0.1" } `
   | Where-Object -FilterScript { $_.IPAddress -Ne "10.0.2.15" } `
   ).IPAddress

Write-Host "Adding host $($ip):2375 to swarm"
docker run --restart=always -d stefanscherer/swarm-windows:1.2.5 join "--addr=$($ip):2375" "token://$TOKEN"
{'fraction_non_alphanumeric': 0.18331716779825413, 'fraction_numerical': 0.037827352085354024, 'mean_word_length': 4.548387096774194, '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': '3001716', 'n_tokens_mistral': 396, 'n_tokens_neox': 377, 'n_words': 77}