Now i can do that by spawning subprocess like this:
app = FastAPI()
@app.post("/create_task")
def create_task(input_data: InputData):
os.system("python main-pipeline.py")
return {
"message": "Task created successfully",
}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
@<1523701070390366208:profile|CostlyOstrich36>
@<1736556867255013376:profile|ImpressionableElk3> , What issues are you having exactly? Can you attach logs?
I'm trying to build a back end app, that receives jsons with inference tasks
it is starting uvicorn server on agent :)
@<1523701070390366208:profile|CostlyOstrich36> thx a lot, i'll check it out right now
I'm expecting that json post request will spawn a task at clearm server/worker
In that case you might be interested in the serving module of ClearML - None
I see. Can you please elaborate on your use case a bit? What are you trying to achieve? Are the servers supposed to be persistent until aborted?