codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
https://codeproject.github.io/codeproject.ai
Other
730 stars 159 forks source link

Running as a service on Jetson Nano #120

Open jasonmhite opened 4 months ago

jasonmhite commented 4 months ago

Area of Concern

Describe the bug It is not well documented how to run the server manually from the command line on Linux or as something like a systemd service. Especially on the Jetson, the docs only mention running it from VSCode. Some of the supported platforms (e.g. Ubuntu/Windows) appear to include service or start scripts, but these don't appear to be included to work from.

Expected behavior Document generally how to run the server from the command line, not just from within VSCode.

Screenshots NA

Your System (please complete the following information):

Additional context The general setup process for the Nano doesn't work super well, I had to do a bunch of manual fixing and searching and playing around to get anything working.

doodieb15 commented 2 months ago

Easy:

create systemD Service:

[Unit]
Description=Codeproject AI Server

[Service]
Type=simple
ExecStart=dotnet /home/jetson/CodeProject.AI-Server-2.6.5/src/server/bin/Debug/net7.0/CodeProject.AI.Server.dll 
WorkingDirectory=/home/jetson/CodeProject.AI-Server-2.6.5/src/server/
Restart=always

[Install]
WantedBy=multi-user.target

restart daemon and start service

kwjjohnson commented 2 months ago

Area of Concern

  • [x] Server
  • [ ] Behaviour of one or more Modules [provide name(s), e.g. ObjectDetectionYolo]
  • [x] Installer
  • [ ] Runtime [e.g. Python3.7, .NET]
  • [ ] Module packages [e.g. PyTorch)
  • [x] Something else

Describe the bug It is not well documented how to run the server manually from the command line on Linux or as something like a systemd service. Especially on the Jetson, the docs only mention running it from VSCode. Some of the supported platforms (e.g. Ubuntu/Windows) appear to include service or start scripts, but these don't appear to be included to work from.

Expected behavior Document generally how to run the server from the command line, not just from within VSCode.

Screenshots NA

Your System (please complete the following information):

  • Current server version, running on Jetson Nano 4GB.

Additional context The general setup process for the Nano doesn't work super well, I had to do a bunch of manual fixing and searching and playing around to get anything working.

Any possibility that you've written down the process for making the Jetson Nano work? I've been struggling for months and still no luck getting it to run... Any input is much appreciated!

doodieb15 commented 2 months ago

That's a good start

https://github.com/codeproject/CodeProject.AI-Server/issues/122#issuecomment-2323412138