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

IMAGE_NAME=pinata-sshd
CONTAINER_NAME=pinata-sshd
VOLUME_NAME=ssh-agent
HOST_PORT=2244
AUTHORIZED_KEYS=$(ssh-add -L | base64 -w0)
KNOWN_HOSTS_FILE=$(mktemp)

trap "rm ${KNOWN_HOSTS_FILE}" EXIT

docker rm -f ${CONTAINER_NAME} >/dev/null 2>&1 || true

docker volume create ${VOLUME_NAME}

docker run --name ${CONTAINER_NAME} \
  -e AUTHORIZED_KEYS="${AUTHORIZED_KEYS}" \
  -v ${VOLUME_NAME}:/ssh-agent \
  -d -p ${HOST_PORT}:22 ${IMAGE_NAME} > /dev/null

if [ "${DOCKER_HOST}" ]; then
  HOST_IP=$(echo $DOCKER_HOST | awk -F '//' '{print $2}' | awk -F ':' '{print $1}')
else
  HOST_IP=127.0.0.1<commit_msg>Fix for new volume create syntax<commit_after>#!/bin/sh
set -e

IMAGE_NAME=pinata-sshd
CONTAINER_NAME=pinata-sshd
VOLUME_NAME=ssh-agent
HOST_PORT=2244
AUTHORIZED_KEYS=$(ssh-add -L | base64 -w0)
KNOWN_HOSTS_FILE=$(mktemp)

trap "rm ${KNOWN_HOSTS_FILE}" EXIT

docker rm -f ${CONTAINER_NAME} >/dev/null 2>&1 || true

docker volume create --name ${VOLUME_NAME}

docker run --name ${CONTAINER_NAME} \
  -e AUTHORIZED_KEYS="${AUTHORIZED_KEYS}" \
  -v ${VOLUME_NAME}:/ssh-agent \
  -d -p ${HOST_PORT}:22 ${IMAGE_NAME} > /dev/null

if [ "${DOCKER_HOST}" ]; then
  HOST_IP=$(echo $DOCKER_HOST | awk -F '//' '{print $2}' | awk -F ':' '{print $1}')
else
  HOST_IP=127.0.0.1
{'fraction_non_alphanumeric': 0.18335901386748846, 'fraction_numerical': 0.029275808936825885, 'mean_word_length': 4.481012658227848, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4188135', 'n_tokens_mistral': 612, 'n_tokens_neox': 561, 'n_words': 115}