question

mp-1784 avatar image
0 Votes"
mp-1784 asked ·

New LUIS app versions failing in docker container.

I've been running my LUIS app in a docker container for a while now. When I make a change to the app I do so via luis.ai. I clone a previous version, make the change in the new version, train, and then export the new version with "Export for containers". I re-build the and re-run the container with the new app .gz file. However, today when I tried doing the same thing, I now get this error:

Error In LUIS Container: Failed while prefetching App: AppId: {redacted AppId} - VersionId: {redacted VersionId} Object reference not set to an instance of an object.

If I export a previously created version and use it in the container, everything works fine. However, any new versions I create fail with the above error. I also tried with a brand new app, and the same thing happens. Does anyone know why I would be getting this error? Could something have changed on the front-end side of luis when creating new versions that I am not aware of? I am using the latest image mcr.microsoft.com/azure-cognitive-services/luis:latest

azure-language-understanding
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered ·

Please follow the below for running LUIS in container.

Option 1:

The models can be COPY'd directly into /input/. e.g.

FROM mcr.microsoft.com/azure-cognitive-services/luis:latest

COPY *.gz /input/
This will work, but requires that you don't mount to /input at runtime as it will squash the COPY'd files. The message "A folder must be mounted" is only logged if the /input directory does not exist.

 docker build . -t luis --no-cache
 Sending build context to Docker daemon 40.43MB
 Step 1/2 : FROM aicpppe.azurecr.io/microsoft/cognitive-services-luis
 ---> df4e32e45b1e
 Step 2/2 : COPY ./*.gz /input/
 ---> c5f41a9d8522
 Successfully built c5f41a9d8522
 Successfully tagged luis:latest
    
 docker run --rm -it -p 5000:5000 luis eula=accept billing=*** apikey=***
 ...
 Using '/input' for reading models and other read-only data.
 ...
 Application started. Press Ctrl+C to shut down.

Option 2

The configuration value Mounts:Input can be set to configure the input location.

This might be useful if you need your models to live in /app/inputfiles or if you need to mount to /input for another reason at runtime.

e.g.

FROM aicpppe.azurecr.io/microsoft/cognitive-services-luis

ENV Mounts:Input=/app/inputfiles
COPY ./*.gz /app/inputfiles/
This results in:

 docker build . -t luis --no-cache
 Sending build context to Docker daemon 40.43MB
 Step 1/3 : FROM aicpppe.azurecr.io/microsoft/cognitive-services-luis
 ---> df4e32e45b1e
 Step 2/3 : ENV Mounts:Input=/app/inputfiles
 ---> Running in b6029a2b54d0
 Removing intermediate container b6029a2b54d0
 ---> cb9a4e06463b
 Step 3/3 : COPY ./*.gz /app/inputfiles/
 ---> 9ab1dfaa36e7
 Successfully built 9ab1dfaa36e7
 Successfully tagged luis:latest
    
 docker run --rm -it -p 5000:5000 luis eula=accept billing=*** apikey=***
 ...
 Using '/app/inputfiles' for reading models and other read-only data.
 ...
 Application started. Press Ctrl+C to shut down.


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.