microsoft / PlanetaryComputer

Issues, discussions, and information about the Microsoft Planetary Computer
https://planetarycomputer.microsoft.com/
MIT License
185 stars 9 forks source link

Error in installation of torch library in R Kernel on MSPC #176

Closed ritviksahajpal closed 2 weeks ago

ritviksahajpal commented 1 year ago

Describe the bug Thank you for a great service. I am reporting a bug related to an installation error for torch package on MSPC

To Reproduce install.packages("torch")

If reporting a change from previous versions

Please read https://cran.r-project.org/web/packages/sits/news/news.html first.

Additional context

Warning message in install.packages("torch"):
“installation of package ‘torch’ had non-zero exit status”
Updating HTML index of packages in '.Library'

Making 'packages.html' ...
 done
R version 4.1.3 (2022-03-10) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Ubuntu 22.04 LTS Matrix products: default BLAS/LAPACK: /srv/conda/envs/notebook/lib/libopenblasp-r0.3.21.so locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] fansi_1.0.3 crayon_1.5.1 digest_0.6.29 utf8_1.2.2 [5] IRdisplay_1.1 repr_1.1.4 lifecycle_1.0.1 jsonlite_1.8.0 [9] evaluate_0.16 pillar_1.8.1 rlang_1.0.5 cli_3.4.0 [13] uuid_1.1-0 vctrs_0.4.1 IRkernel_1.3 tools_4.1.3 [17] glue_1.6.2 fastmap_1.1.0 compiler_4.1.3 base64enc_0.1-3 [21] pbdZMQ_0.3-7 htmltools_0.5.3
ritviksahajpal commented 1 year ago

Also added to the sits library github page: https://github.com/e-sensing/sits/issues/905

TomAugspurger commented 1 year ago

xref https://github.com/microsoft/planetary-computer-containers/issues/36.

Last I looked, rtorch wasn't available in conda-forge. I see that https://github.com/conda-forge/r-torch-feedstock is available now, so perhaps that's unblocked.

I also see that r-sits includes it as a dependency on conda-forge now. I'll see if I can update https://github.com/Microsoft/planetary-computer-containers to include it.

gilbertocamara commented 1 year ago

Dear Tom and Ritvik

We use the R version of torch in MPC for our work without any problems. Please follow the installation procedures described in https://e-sensing.github.io/sitsbook/setup.html.

In any case, we suggest that you use an Ubuntu virtual machine. There are a number of limitation of Windows platforms for the R environment, most notably linked to parallelisation.

Please use an Ubuntu VM, install R and RStudio, and then install “sits” from CRAN in the usual way:

install.packages(“sits”, dependencies = TRUE).

This should install everything, including “torch”. After installation is finished, please run

torch::install_torch()

In case of problems, please contact us.

Best Gilberto

Prof Dr Gilberto Camara Senior Researcher National Institute for Space Research (INPE), Brazil https://gilbertocamara.org/

On 30 Jan 2023, at 09:24, Tom Augspurger @.***> wrote:

xref microsoft/planetary-computer-containers#36. Last I looked, rtorch wasn't available in conda-forge. I see that https://github.com/conda-forge/r-torch-feedstock is available now, so perhaps that's unblocked. I also see that r-sits includes it as a dependency on conda-forge now. I'll see if I can update https://github.com/Microsoft/planetary-computer-containers to include it. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghidalgo3 commented 2 weeks ago

The hub is no longer available.