> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlimina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Running the Container

> Running the Container covers how to create and run the container on your local machine and authentication.

The CPU container can be run with the following command:

```shell Docker Command theme={"theme":"poimandres"}
docker run --rm -v "full path to license.json":/app/license/license.json \
-p 8080:8080 -it crprivateaiprod.azurecr.io/deid:<version>
```

The command to run the GPU container requires an additional `--gpus` flag to specify the GPU ID to use. The full GPU container also requires 4GB shared memory, which is set via the `--shm-size` flag. For the text-only GPU container the shared memory flag is not necessary:

```shell Docker Command theme={"theme":"poimandres"}
docker run --gpus '"device=<GPU_ID, usually 0>"' --shm-size=<4g, only required for non-text container> --rm -v "full path to license.json":/app/license/license.json \
-p 8080:8080 -it crprivateaiprod.azurecr.io/deid:<version>
```

It is recommended to deploy the container on single GPU machines. For multi-GPU machines, please launch a container instance for each GPU and specify the `GPU_ID` accordingly. You can get the `GPU_ID` using the `nvidia-smi` command if you have access to runner. You can find more information regarding using GPUs with docker [here](https://docs.docker.com/config/containers/resource_constraints/#expose-gpus-for-use).

For private or public cloud deployment, please see [Deployment](/installation/deploying-into-production) and the [Kubernetes Setup Guide](/installation/kubernetes-setup-guide).

<Note>
  `crprivateaiprod.azurecr.io` is intended for image distribution only. For production use, it is strongly recommended to set up a container registry inside your own compute environment to host the image.
</Note>

## Apple Silicon

It is possible to run the Limina container on Apple Silicon-based Macs, such as the M1 Macbook Pro, even though it is not officially supported. To do this, please make sure you use Docker Desktop 4.25 or later and enable [Rosetta2 support](https://www.docker.com/blog/docker-desktop-4-25/). During our testing we didn't encounter issues with M1 Macs but did encounter some container startup issues on M2 Macs. If this occurs, please try disabling [Rosetta2 support](https://www.docker.com/blog/docker-desktop-4-25/).

Due to the need to emulate x86 instructions, performance is significantly lower than x86-based machines, let alone GPU-equipped machines. On a M1 Macbook Pro, our tests revealed a throughput of approximately 250 words per second.

## Authentication and External Communications

The container makes external communications to Limina's servers for authentication and usage reporting. To this end, please make sure that the following are reachable:

* `https://verify1.private-ai.com:443/license-verification/license_status`
* `https://verify2.private-ai.com:443/license-verification/license_status`
* `https://app.amberflo.io:443/ingest/`

These communications do not contain any customer data - if training data is required, this must be given to Limina separately. Please see the [FAQ](/faq/#does-your-container-call-home) for more details on what is sent. An authentication call is made upon the first API call after the Docker image is started, and again at pre-defined intervals based on your subscription.

## URI-Based File Support

Running the container with the above commands allows for base64-encoded files to be processed with `/process/files/base64`. However, to utilize the `/process/files/uri` route, a volume where input files are stored and `PAI_OUTPUT_FILE_DIR` must be provided. Note that `PAI_OUTPUT_FILE_DIR` must reside inside the mounted volume.

```shell Docker Command theme={"theme":"poimandres"}
docker run --rm -v "full path to your license.json file":/app/license/license.json \
-e PAI_OUTPUT_FILE_DIR=<full path to output> \
-v <full path to files>:<full path to files> \
-v <full path to output>:<full path to output> \
-p 8080:8080 -it crprivateaiprod.azurecr.io/deid:<version>
```

For example, if your license file is in your home directory, the input directory you wish to mount is called inputfiles and the output directory is output:

```shell Docker Command theme={"theme":"poimandres"}
docker run --rm -v /home/<username>/license.json:/app/license/license.json \
-e PAI_OUTPUT_FILE_DIR=/home/<username>/output \
-v /home/<username>/inputfiles:/home/<username>/inputfiles \
-v /home/<username>/output:/home/<username>/output \
-p 8080:8080 -it crprivateaiprod.azurecr.io/deid:3.0.0-cpu
```
