Search code examples
python-3.xgpuartificial-intelligence

Accessing python file from another computer


My web product is on my Server. It does not have GPU. I need to run few AI algorithms and display that output on my website. I want to run that code on my another system which consists of GPU . Is that possible If yes? can you please suggest?

Edit: GPU and CPU are on the same server. Right now Algorithms are not been hosted on any server.


Solution

  • yes it is kinda possible and let me explain. first, you should have the python script that you wanna run on your computer with a GPU available. second, you need to code a python based server that listens for incoming connections, when a connection connects to the server, the server executes the python file, saves the output through piping and then returns the output to the connection. this can be deployed with website easily. you can use php sockets to send and receive data to your python server.

    Idea : Python Server Running On Specific Port Listening For Incoming Connections ==> A Connection Hits The Server ==> The Servers Runs The Code That contains the AI Of Yours, Saves The Outputs and sends back the output to the client.