<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi everybody,<div>my hope is to reference the necessary files and folders or copy them on an R image to use GRASS functions in R.</div><div><br></div><div>I have a Docker file like the following:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>FROM neteler/grassgis7 as thegrass</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><b><span style="font-variant-ligatures:no-common-ligatures"></span><br></b></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>FROM rocker/rstudio</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>COPY --from=thegrass /usr/local/grass79 /usr/local/grass79</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>COPY --from=thegrass /data /data</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>COPY --from=thegrass /home/grass /home/grass</b></span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><b><span style="font-variant-ligatures:no-common-ligatures"></span><br></b></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>RUN sudo apt-get install -y libcurl4-openssl-dev libxml2-dev</b></span></p></div><div><br></div><div>Then I build and run the image which has a few folders from GRASS GIS</div><div>In RStudio, I install and call the "rgrass7" and "raster" libraries. (No errors)</div><div><br></div><div>Then in Rstudio, I try to run the initGRASS function with the following values:</div><div><pre tabindex="0" class="gmail-GD15MCFCEUB" id="gmail-rstudio_console_output" style="font-family:Monaco,monospace,monospace;font-size:12px;outline:none;border:none;word-break:break-all;margin-top:0px;margin-bottom:0px;line-height:1.45;color:rgb(0,0,0);white-space:pre-wrap"><span class="gmail-GD15MCFCKTB gmail-ace_keyword" style="color:blue">initGRASS(gisBase = "/usr/local/grass79", home = raster::tmpDir(), gisDbase = "tmpDbase", location = "Kitchener", mapset = "PERMANENT", override = TRUE)</span></pre><pre tabindex="0" class="gmail-GD15MCFCEUB" id="gmail-rstudio_console_output" style="font-family:Monaco,monospace,monospace;font-size:12px;outline:none;border:none;word-break:break-all;margin-top:0px;margin-bottom:0px;line-height:1.45;color:rgb(0,0,0);white-space:pre-wrap"><span class="gmail-GD15MCFCKTB gmail-ace_keyword" style="color:blue"><br></span></pre><pre tabindex="0" class="gmail-GD15MCFCEUB" id="gmail-rstudio_console_output" style="font-family:Monaco,monospace,monospace;font-size:12px;outline:none;border:none;word-break:break-all;margin-top:0px;margin-bottom:0px;line-height:1.45;color:rgb(0,0,0);white-space:pre-wrap"><span class="gmail-GD15MCFCKTB gmail-ace_keyword" style="color:blue">This is the error I recieve:
</span><span class="gmail-GD15MCFCOTB gmail-ace_constant" style="color:rgb(197,6,11)">Error in parseGRASS(cmd, legacyExec = legacyExec) : The command
g.region --interface-description
could not be run (127), and produced the error message:
g.region: error while loading shared libraries: libproj.so.12: cannot open shared object file: No such file or directory
</span><span class="gmail-GD15MCFCOTB gmail-ace_constant" style="color:rgb(197,6,11)">In addition: </span><span class="gmail-GD15MCFCOTB gmail-ace_constant" style="color:rgb(197,6,11)">Warning message:
</span><span class="gmail-GD15MCFCOTB gmail-ace_constant" style="color:rgb(197,6,11)">In system2(command = command, args = arguments, stdout = outFile, :
</span><span class="gmail-GD15MCFCOTB gmail-ace_constant" style="color:rgb(197,6,11)"> </span><span class="gmail-GD15MCFCOTB gmail-ace_constant" style="color:rgb(197,6,11)"> error in running command</span></pre></div><div><br></div><div>Do you know a better way to merge the GRASS GIS files with the R image?</div><div>Would you please help me to complete the Dockerfile to avoid such errors?</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div>Kind regards,</div><div><br></div><div>Mehrdad</div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=1Xxc6Ymwo9RC5flfX9TWSpXBYvNpJiYQq&revid=0B1oBiE3Da0LEYUIvTnZnQmI0WjV2ejhDdFdTRzlCVUM2OFVvPQ" width="96" height="16"><br></div><div>Mehrdad Varedi, <a href="http://M.A.Sc" target="_blank">M.A.Sc</a>.<br></div><a href="http://www.waterlix.com" target="_blank">Waterlix</a> Inc. Founder<br></div><div><a href="http://www.waterlix.com" target="_blank">www.waterlix.com</a><br></div>Cell: +1 (519)722-7057<br></div></div></div></div></div></div></div></div></div></div></div></div>