<div dir="ltr">Hi Nyall,<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Not sure if you've seen<br><a href="https://github.com/qgis/QGIS-Enhancement-Proposals/issues/140" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS-Enhancement-Proposals/issues/140</a> , but<br>that's designed with this use case very much in mind (and supports<br>specifying a model file via the command line, no need for registering<br>it in advance anywhere).</blockquote><div><br></div><div>Wow, this is more or less what I want to do also. In my case, I want to use QGIS docker image and add a python script to handle the input. I put my code in <a href="https://github.com/ismailsunni/docker-qgis3-model">https://github.com/ismailsunni/docker-qgis3-model</a>. It's still in exploration mode, and still not working with dynamically using a model from the user. Hopefully, it will be done soon (at least at the end of my course semester :D ). This for my school project actually, but perhaps it can be useful for other people.</div><div><br></div><div>I use a YAML  file to define the input and output since I feel it's not easy to put the long parameter after the command.</div><div><br></div><div>After reading the QEP and another QEP about official docker image [1], so this Docker image [2] is not yet an official one?<br></div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's mostly done at<br><a href="https://github.com/nyalldawson/QGIS/commit/631460cd1b8481cb118b7df2afacc5c3df40b3ad" rel="noreferrer" target="_blank">https://github.com/nyalldawson/QGIS/commit/631460cd1b8481cb118b7df2afacc5c3df40b3ad<br></a>, but I need some funds to finalise this and get it merged (e.g. it's<br>missing unit tests, and needs upgrading to handle the .var style<br>initialisation used by QGIS windows executables, and I also suspect<br>there'll be some packaging changes required to allow it to be built<br>and installed without the QGIS gui/application libraries).</blockquote><div><br></div><div>The implementation seems will be easier to use in Windows. Since by using Docker, Windows user needs to install Docker first, and it's really not straight forward unless you have Win 10 Pro.</div><div><br></div></div><div>Thanks for sharing Nyall. My search engine did not show the QEP or your branch to me :)</div><div><br></div><div>Best regards</div><div><br></div><div>[1] <a href="https://github.com/qgis/QGIS-Enhancement-Proposals/issues/142">https://github.com/qgis/QGIS-Enhancement-Proposals/issues/142</a></div><div>[2] <a href="https://hub.docker.com/r/qgis/qgis/">https://hub.docker.com/r/qgis/qgis/</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 31, 2019 at 12:17 AM Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@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">On Tue, 28 May 2019 at 23:57, Ismail Sunni <<a href="mailto:imajimatika@gmail.com" target="_blank">imajimatika@gmail.com</a>> wrote:<br>
><br>
> Dear QGIS developers,<br>
><br>
> 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.<br>
<br>
Not sure if you've seen<br>
<a href="https://github.com/qgis/QGIS-Enhancement-Proposals/issues/140" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS-Enhancement-Proposals/issues/140</a> , but<br>
that's designed with this use case very much in mind (and supports<br>
specifying a model file via the command line, no need for registering<br>
it in advance anywhere).<br>
<br>
It's mostly done at<br>
<a href="https://github.com/nyalldawson/QGIS/commit/631460cd1b8481cb118b7df2afacc5c3df40b3ad" rel="noreferrer" target="_blank">https://github.com/nyalldawson/QGIS/commit/631460cd1b8481cb118b7df2afacc5c3df40b3ad</a><br>
, but I need some funds to finalise this and get it merged (e.g. it's<br>
missing unit tests, and needs upgrading to handle the .var style<br>
initialisation used by QGIS windows executables, and I also suspect<br>
there'll be some packaging changes required to allow it to be built<br>
and installed without the QGIS gui/application libraries).<br>
<br>
Nyall<br>
<br>
><br>
> 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:<br>
><br>
> Trying to find Python API to do it. I couldn't find it (perhaps I missed it)<br>
> Trying to add/copy manually the model file to the model directory. Unfortunately, in the container doesn't even have any profile directory.<br>
> I tried to find the model directory path, but I can't find it from QSettings (it returns empty setting with QSettings.allKeys())<br>
> I tried to manually create the directories based on my machine model directory location, but it's not working also.<br>
><br>
> Any suggestions for this problem? A Python API to add/register the model would be a perfect solution.<br>
><br>
> Thanks<br>
><br>
> --<br>
> Ismail Sunni<br>
> <a href="http://ismailsunni.wordpress.com" rel="noreferrer" target="_blank">ismailsunni.wordpress.com</a><br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><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>