Open darribas opened 2 years ago
Started addressing issues above in #34. A few questions from that work:
click
, am I missing something @mfbenitezp?Once this is working, I think we could move Dockerfile
to Dockerfile.spc
and push the image to Docker Hub, so we can have a quick Dockerfile
that runs smoothly on Binder.
Thanks @darribas, for looking into this, what demos are you referring to? the notebook I created? in that case we don't use click
, that was used in the script to run in the shell, where we "need" to ask some input from users. In terms of the Docker as I said, I tested in MacOS, but we have been updating the tool since I initially tested the docker image. I will take at look next week.
Can you described what error did you get when where building the tool, im guessing during thecargo --release
@darribas Understood what you mean, after our chat., yeah the demos, I bet were not able to run in your env, bcs in my env I have installed the libs i needed ( JupiterLab, geopandas and others I am familiar with ) It would great to have pandas and envs like Jupyter notebook and so son in that docker image for those users also want to play with the .pb files.
Added quarto
/jupytext
in d4423c1, and if you download the .pb
file into the location it expects it, I think your notebook works.
Also, I added the python
folder to the path, so you're available to import synthpop_pb2
without adding anything at runtime.
This is the error I get when building the Rust lib (any suggestions @dabreegster ?):
This is the error I get when building the Rust lib
It's failing to build the proj crate. IIUC, this crate doesn't link to your system install of proj
but instead "vendors" in a certain version of the proj source code, and builds that. The error says cmake
can't find a c++
command. Per the existing Dockerfile, there should only be 3 things needed on ubuntu: apt-get install -y cmake sqlite3 libclang-dev
. In your new dockerfile, those 3 are still all included.
One first guess: The difference is you're also installing libproj15
through apt, and maybe it's somehow trying to use that install of building proj
from source, which the crate normally does. But looking at what it's doing... "cmake" "/home/jovyan/.cargo/registry/src/github.com-1ecc6299db9ec823/proj-sys-0.22.0/PROJSRC/proj/proj-8.1.0"
It's compiling proj that's bundled in through the proj-sys
crate, and it's a very different version. So seemingly the other proj installation should not conflict.
Second guess: let's ignore all of that and just address the actual error, which is that there's no c++
command. Can you try apt-get install g++
as well? You're using a different base image. If that doesn't work, try apt-get install build-essential
to hopefully pull in everything needed to build normal C / C++ projects.
(The above is convoluted. tldr, the proj-sys
crate is trying to build the C++ proj source from scratch. It's missing the C++ compiler. That's because the docker base image you switched to probably doesn't include enough ubuntu dependencies to get a normal C++ build environment.)
After @dabreegster's fix, this seems to be ready to go!
It'd be nice to have a
Dockerfile
that builds an image with which a user can do everything we show on the documentation, particularly new users getting up to speed (and that we could serve on Binder for easy demos).This should support:
.pb
files as described hereBy my own account, this would require:
rust:1.60
, but what would it take to add to a non-Rust image? It'd be good to detail). I think this is:cmake
sqlite3
libclang-dev
protobuf
synthpop_pb2.py
pandas
plotly
click
Note the proposal above is not a minimal image that can just generate files but a larger one that allows users interaction and exploration at the expense of a larger footprint.