Deploy NLU model in the background with virtualenv activated

Hello I am building an NLU only model. I have followed the instructions and have enable the API with

rasa run --enable-api -m models/nlu-model.tar.gz

However when I exit my terminal the rasa server and virtual environment shuts down and I can no longer use my NLU model. How do I keep the rasa server running in the background and keep the virtual environment activated so that I can close my terminal/shut off my computer?

Also I’m not sure if this is related but I prefer to do this without docker. If docker is necessary would you please explain why I need it?

Thank you in advance.

You could also set it up as a systemd service (assuming you’re on linux).

@stephens thanks for answering Stephens. Yes I am on a Linux server. Can you provide some guidance on how to create the Linux service?

If you google the topic you should find lots of examples of how to setup a systemd service. I think you’d be better off with docker-compose but it sounds like you’d prefer not to use docker.

For people who do not want to set up a docker-compose or setup a systemd service, I resolved this issue with tmux.