-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with raster, terra etc when using the devcontainer base image #4
Comments
@eeholmes yup all correct.
Or optionally install bleeding edge GDAL libraries using
as in https://github.com/eeholmes/earthdata-cloud-cookbook/blob/main/.devcontainer/venv.Dockerfile#L8 . The former option is much "safer" -- the latter option means R packages that bind GDAL (terra, sf, gdalcubes) must be built from source, and it's easy to accidentally install/upgrade one of those as binaries on the dev_osgeo flavor, so probably better to stick with Re Codespaces -- yup, I think that's right. We can probably figure out a similar 'opt-in' script to make it easier to add the stuff that is in the devcontainer flavor on an arbitrary image. Just need to take a closer look at what's needed there. |
We installed raster, terra, etc in |
|
Also, arg, the install.packages used the latest versions in posit packagemanager rather than 'seeing that we had an older version of R when we used rocker/geospatial:4.2.2 |
right, none of the R packages (sf, terra, gdalcubes) that bind the system OSGeo C++ libraries (the GDAL, PROJ, and GEOS libraries) can be successfully installed without those system libraries being installed either from apt get (e.g. using Also, |
whenever you use the |
We are not using the latest tag. We are using rocker/geospatial:4.2 (because we are using the Openscapes image at the moment) That uses https://p3m.dev/cran/__linux__/jammy/2023-04-20 But I can see from the GitHub Actions log that when it gets to install.R, it uses /jammy/2024-03-21 so "current" date. So for the time being I spec the repo in install.R. Yes, I know a bunch of these already are in rocker/geospatial. just didn't want to go digging to figure out what packages are in rocker/geospatial.
|
Also thanks for the info re how to properly add geospatial packages! I am learning as I go with the rocker images. I will fix the image to work with |
re the version issue -- ah weird. yup, setting the repo to your preferred snapshot date is great. Still weird that it got |
It is here: But if I had used rocker/geospatial:4.2 as the base, it will grab the right repo (same as that in geospatial:4.2) but instead I am using openscapes/rocker which is based on rocker/geospatial:4.2. In this case, it is not recognizing the repo used in the base image. Obviously this is user error, but I am not sure what I need to do to make install.R use the right repo besides hard coding in the repo. What I want is for it to use the env variable CRAN... |
@cboettig
In an image with
as the base image. We were unable to load spatial packages (installed via
install.r
).https://github.com/nmfs-opensci/container-images/blob/main/images/coastwatch/Dockerfile
https://github.com/nmfs-opensci/container-images/blob/main/images/coastwatch/install.R
error
The file that it cannot open changes. terra.so and ncdf4.so were common.
fix
Switched to
to get it to work. Note
install.R
has rgdal which is deprecated. Maybe that is the issue? Need to test wo that.to test
Use ghcr.io/rocker-org/devcontainer/tidyverse:4.3 in 'bring your image' and then install some spatial packages and see if problem persists. Or slowly add packages to
install.R
and see when the problem appears.The text was updated successfully, but these errors were encountered: