New LUIS app versions failing in docker container.

mp 1 Reputation point
2020-05-19T21:42:07.297+00:00

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 AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,902 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,741 Reputation points
    2020-05-22T09:00:09.647+00:00

    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.
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.