<div dir="ltr">HI Luigi, <div><br></div><div>Thanks for the pointer, it's really helpful. Now I got my model registered :) </div><div><br></div><div>I convert it to Python script first, then add it as you said.</div><div><br></div><div>Next, I will check if it's working properly</div><div><br></div><div>Best regards</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 28, 2019 at 5:52 PM Luigi Pirelli <<a href="mailto:luipir@gmail.com">luipir@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>I'm travelling, but iIRC, you need before register model provider in processing... There are processing tests about alg provider registry.<br>On Tuesday, 28 May 2019, Ismail Sunni <<a href="mailto:imajimatika@gmail.com" target="_blank">imajimatika@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear QGIS developers,<div><br></div><div>Currently, I am trying to create a Docker image based on QGIS official docker image to run a custom processing model. I am able to run the existing processing model by using a python script.</div><div><br></div><div>Unfortunately, for a custom model, I need to register the model first (similar to adding a new model in QGIS toolbox) before I can use it. I try some ways to do it:</div><div><ol><li>Trying to find Python API to do it. I couldn't find it (perhaps I missed it)</li><li>Trying to add/copy manually the model file to the model directory. Unfortunately, in the container doesn't even have any profile directory.</li><li>I tried to find the model directory path, but I can't find it from QSettings (it returns empty setting with <i>QSettings.allKeys()</i>)</li><li>I tried to manually create the directories based on my machine model directory location, but it's not working also.</li></ol><div>Any suggestions for this problem? A Python API to add/register the model would be a perfect solution.</div></div><div><br></div><div>Thanks</div><div><div><br></div>-- <br><div dir="ltr">Ismail Sunni<br><div><a href="http://ismailsunni.wordpress.com" target="_blank">ismailsunni.wordpress.com</a></div></div></div></div>
</blockquote><br><br>-- <br><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Luigi Pirelli<br><br>**************************************************************************************************<br>* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br>* Mastering QGIS 2nd Edition:<br>* <a href="https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition" target="_blank">https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition</a><br>* Hire me: <a href="http://www.qcooperative.net" target="_blank">http://www.qcooperative.net</a><br>**************************************************************************************************</div></div></div></div><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Ismail Sunni<br><div><a href="http://ismailsunni.wordpress.com" target="_blank">ismailsunni.wordpress.com</a></div></div>