<commit_before>#!/bin/bash
echo "=================================="
echo "  Stopping containers ... "
echo "=================================="

CONTAINERS_TO_DELETE=$(docker ps -qa)
if [ -n "$CONTAINERS_TO_DELETE" ]; then
  docker stop $CONTAINERS_TO_DELETE

  echo "=================================="
  echo "  Deleting containers ... "
  echo "=================================="
  docker rm $CONTAINERS_TO_DELETE
fi

echo "=================================="
echo "  Stopped and deleted containers. "
echo "=================================="

echo "=================================="
echo "  Removing obsolete images ... "
echo "=================================="


IMAGES_TO_REMOVE=$(docker images | grep "^<none>" | awk '{print $3}')<commit_msg>fix image removal<commit_after>#!/bin/bash
echo "=================================="
echo "  Stopping containers ... "
echo "=================================="

CONTAINERS_TO_DELETE=$(docker ps -qa)
if [ -n "$CONTAINERS_TO_DELETE" ]; then
  docker stop $CONTAINERS_TO_DELETE

  echo "=================================="
  echo "  Deleting containers ... "
  echo "=================================="
  docker rm $CONTAINERS_TO_DELETE
fi

echo "=================================="
echo "  Stopped and deleted containers. "
echo "=================================="

echo "=================================="
echo "  Removing obsolete images ... "
echo "=================================="


IMAGES_TO_DELETE=$(docker images | grep "^<none>" | awk '{print $3}')
{'fraction_non_alphanumeric': 0.4525065963060686, 'fraction_numerical': 0.0013192612137203166, 'mean_word_length': 6.4, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2122439', 'n_tokens_mistral': 426, 'n_tokens_neox': 363, 'n_words': 91}