Text Processing Export Grammar is raising error while creating Docker image
**Describe the bug**

While exporting grammar we are facing error while creating the docker image.

**Steps/Code to reproduce bug**

``` bash
cd tools/text_processing_deployment
bash export_grammars.sh --GRAMMARS=tn_grammars --LANGUAGE=en --INPUT_CASE=cased --FORCE_REBUILD=True --OVERWRITE_CACHE=True
```

Above command is stopping with the following error:
![docker image build error](https://user-images.githubusercontent.com/1061389/189801110-4b014c4c-f161-456b-bdd5-c538e287122e.png)

**Expected behavior**

To export the grammar the sparrowhawk image has to be built completely.

**Environment details**

``` text
Client: Docker Engine - Community
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:02:57 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:03 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
```

If NVIDIA docker image is used you don't need to specify these.
Otherwise, please provide:
- OS version: Ubuntu 20.04
- Python version: Python 3.8.10 (on the host machine)