<commit_before>#!/bin/bash
set -e

IPV4_ADDR=${IPV4_ADDR:-$1}
ETCD_DISCOVERY=${ETCD_DISCOVERY:-$2}

# Setup and copy etcd environment file
sed "s#{{PUBLIC_ADDR}}#$IPV4_ADDR#g" etcd2.env > /etc/etcd2.env
sed -i "s#{{ETCD_DISCOVERY_URL}}#$ETCD_DISCOVERY#g" /etc/etcd2.env
# Copy etcd service file
cp etcd2.service /etc/systemd/system/etcd2.service

# Add DOCKER_OPTS into docker.service file
sed -i "s#ExecStart=/usr/bin/dockerd#ExecStart=/usr/bin/dockerd \$DOCKER_OPTS#" /lib/systemd/system/docker.service

# Copy docker service dropin file
DOCKER_CONF_PATH=/etc/systemd/system/docker.service.d
mkdir -p ${DOCKER_CONF_PATH}
cp 20-docker.conf ${DOCKER_CONF_PATH}/20-docker.conf
cp 10-wait-docker.conf ${DOCKER_CONF_PATH}/10-wait-docker.conf

# Open 2375 port for docker service
cp docker-tcp.socket /etc/systemd/system/docker-tcp.socket<commit_msg>config-docker-service and be re-excuted<commit_after>#!/bin/bash
set -e

IPV4_ADDR=${IPV4_ADDR:-$1}
ETCD_DISCOVERY=${ETCD_DISCOVERY:-$2}

# Setup and copy etcd environment file
sed "s#{{PUBLIC_ADDR}}#$IPV4_ADDR#g" etcd2.env > /etc/etcd2.env
sed -i "s#{{ETCD_DISCOVERY_URL}}#$ETCD_DISCOVERY#g" /etc/etcd2.env
# Copy etcd service file
cp etcd2.service /etc/systemd/system/etcd2.service

# Add DOCKER_OPTS into docker.service file
sed -i "s#ExecStart=/usr/bin/dockerd -H fd://#ExecStart=/usr/bin/dockerd \$DOCKER_OPTS -H fd://#" /lib/systemd/system/docker.service

# Copy docker service dropin file
DOCKER_CONF_PATH=/etc/systemd/system/docker.service.d
mkdir -p ${DOCKER_CONF_PATH}
cp 20-docker.conf ${DOCKER_CONF_PATH}/20-docker.conf
cp 10-wait-docker.conf ${DOCKER_CONF_PATH}/10-wait-docker.conf

# Open 2375 port for docker service
cp docker-tcp.socket /etc/systemd/system/docker-tcp.socket
{'fraction_non_alphanumeric': 0.14573732718894009, 'fraction_numerical': 0.02534562211981567, 'mean_word_length': 5.270758122743683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2452754', 'n_tokens_mistral': 761, 'n_tokens_neox': 700, 'n_words': 126}