<commit_before># Running MLDB in batch mode

MLDB can be run in batch mode by running the executable directly via docker:

```
docker run \
  --rm=true \
  -v </absolute/path/to/mldb_data>:/mldb_data \
  -e MLDB_IDS="`id`" \
  quay.io/datacratic/mldb:latest /usr/bin/mldb_runner \
  --plugin-directory /opt/mldb/plugins \
  --run-script /mldb_data/<script>
```

The `<script>` argument must be local (in the mldb_data directory), as the
credentials daemon is not available when running MLDB in batch mode.

If you want MLDB to continue to run after the script is done, you may wish to
pass the HTTP arguments and make Docker listen on a port, as so:

```
docker run \
  --rm=true \
  -v </absolute/path/to/mldb_data>:/mldb_data \
  -e MLDB_IDS="`id`" \
  -p 127.0.0.1:<mldbport>:80 \
  quay.io/datacratic/mldb:latest /usr/bin/mldb_runner \
  --http-listen-port 80 \
  --plugin-directory /opt/mldb/plugins \
  --dont-exit-after-script \
  --run-script /mldb_data/<script>
```<commit_msg>Update BatchMode.md<commit_after># Running MLDB in batch mode

MLDB can be run in batch mode by running the executable directly via docker:

```
docker run \
  --rm=true \
  -v </absolute/path/to/mldb_data>:/mldb_data \
  -e MLDB_IDS="`id`" \
  quay.io/datacratic/mldb:latest /opt/bin/mldb_runner \
  --plugin-directory /opt/mldb/plugins \
  --run-script /mldb_data/<script>
```

The `<script>` argument must be local (in the mldb_data directory), as the
credentials daemon is not available when running MLDB in batch mode.

If you want MLDB to continue to run after the script is done, you may wish to
pass the HTTP arguments and make Docker listen on a port, as so:

```
docker run \
  --rm=true \
  -v </absolute/path/to/mldb_data>:/mldb_data \
  -e MLDB_IDS="`id`" \
  -p 127.0.0.1:<mldbport>:80 \
  quay.io/datacratic/mldb:latest /opt/bin/mldb_runner \
  --http-listen-port 80 \
  --plugin-directory /opt/mldb/plugins \
  --dont-exit-after-script yes \
  --run-script /mldb_data/<script>
```
{'fraction_non_alphanumeric': 0.13773965691220988, 'fraction_numerical': 0.010090817356205853, 'mean_word_length': 3.13125, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '7385918', 'n_tokens_mistral': 793, 'n_tokens_neox': 760, 'n_words': 210}