Open amerenda opened 3 years ago
This sound really strange. Just to confirm:
If you write docker build -t foo .
in your shell and produce a docker image tagged foo
it loads the map just fine, but if you have a script file with the content docker build -t bar .
, run bash <yourscriptfile>
and run the docker image tagged bar
it fails to render the map?
What makes me wonder most: If you re-run building the same image (either from script or from the shell) docker should use caching (i.e. not re-build the docker layers) -- so if you build using docker build -t foo .
on the shell once and then bash <yourscriptfile>
I expect docker to simply re-tag the same image -- does it work then?
I also stumble over the same error you reported, but I think that it is related to the wrong version of the javascript code being "encoded" in the python wrapping code.
In my case, I get the following in a terminal in the JupyterLab (where the map fails to work):
jupyter labextension list
reports version 0.3.0 for keplergl, while pip show keplergl
reports version 0.3.1. So I suspect that the error you (and I) see is simply due to this version mismatch...
I hope that this will be solved soonish once https://github.com/keplergl/kepler.gl/commit/5b442c5dda5a423261f0f663bd956f31016092b7 is published to pypi.org.
I have also opened an issue in the Jupyter Docker stacks repo: https://github.com/jupyter/docker-stacks/issues/1434
Describe the bug Kepler will not display a map if built in a docker container via a script. But will display the map if built via a terminal emulator. This behavior is consistent when built both ways on the same VM, with the same Dockerfile and same version of docker. Running
jupyter lab build
on the image built via a script will allow the map to load correctly.To Reproduce Steps to reproduce the behavior:
Dockerfile
Script to create
Map code
Expected behavior Kepler loads a map
Screenshots https://imgur.com/XM5I3gs
Environment (please complete the following information):
python 3.9.6
keplergl-jupyter v0.3.0
20.10.8, build 3967b7d
Additional context If you run this command via bash/zsh from a terminal
docker build $DOCKER_PATH -t $IMAGE_NAME:$TAG
run the container, and load the kepler map, it will display correctly.When running the docker build via a script it fails.
To eliminate any environmental sources, I ran the build manually on the VM, confirmed it worked, and ran the script on the same VM with the same Dockerfile and confirmed it did not work.
I thought that maybe it was related to docker being called from a bash pipe and not a TTY? But I called it via tmux in a script, confirmed it was running in a TTY, and I had the same issue.
I also thought maybe there was a rogue environment variable being set, so I compared the output of
env
on both a script and via the terminal. The differences are:Terminal
Script
I also run the build via a terminal inside a tmux session where
SHLVL=2
and I setTERM=sceen-256color
and confirmed the map loaded.Terminal env
Script env
I get the following console errors if I use the Chrome dev tools when built via a script.
I've never seen anything like this issue and I'm not sure how to proceed. I don't know if it is a docker issue, a kepler issue, or an NPM issue? If anyone has any insights, it would be greatly appreciated. For now, I cannot get Kepler to run on Jupyter unless I build my container manually.