-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
add_raster doesn't work in container environment #1027
Comments
Take a look at this one to see if it helps. |
Thanks for the suggestion. Unfortunately not. I tried the suggested Dockerfile, including with various permutations, but it hangs up on gdal. Build logs show an error related to not finding gdal-config:
|
Note that adding the following:
To the Dockerfile first doesn't solve it (after changing from USER jovyan to root first) |
Just as an update to this,
My notebook runs fine (accessed on the cluster through an ssh tunnel) and creates a leafmap, but the COGS I am trying to display with I see from previous issues (here and more recently here) that for running on remote servers one should add:
After installing |
Environment Information
Description
I am having difficult getting leafmap to display a local COG when running in a container. I have tried multiple permutations of building leafmap into a docker container, all of which show slightly different failures. These are described below.
What I Did
I will start with the most recent, which is simply directly running the image giwqs/leafmap:latest, with the following command:
Note I am mounting a few directories here to get access to local files, the most important of which is a directory containing the local COGs I want to display, which I form paths to and then try to display using these lines, adapted from several notebook cells:
The first failure is that
add_raster
saysxarray
isn't installed. To fix this, I simply opened a terminal in the jupyter lab environment and ranmamba install xarray
, restarted the kernel, and ran again.This time it ran, but the COG does not display. Going on previous guidance, I then also tried adding
jupyter-server-proxy
and then added the following to lines to my imports:Restarted and ran again. The COG still doesn't show up.
So I am stuck here. I should note I have also tried to build my own containers, using several different variants. One of these is as follows, which is simply adapting the Dockerfile in this repo, and adding the missing xarray and rioxarray, and a few other bits:
Running the same code as above, I get a different error, which has bedevilled me across multiple attempts at this, which is that I get an error saying
localtileserver
doesn't exist, when it does, but it is failing because:A different, pip-based version of the build script bypasses the error:
With requirements:
But this has the same problem with displaying COGs--they just don't show up (and I have tried adding jupyter-server-proxy).
So I am stuck here. I will not that an ordinary, non containerized install of leafmap using conda/mamba does show the COGs, but I want to containerize this for use on a cluster account.
This is probably an issue with localtileserver, but perhaps there is a fix known here for getting it to work with
add_raster
. Any solutions will be most appreciated.The text was updated successfully, but these errors were encountered: