alan-turing-institute / uatk-spc

Synthetic Population Catalyst
https://alan-turing-institute.github.io/uatk-spc/
MIT License
20 stars 12 forks source link

Update Docker image to support all functionality in the project #33

Open darribas opened 2 years ago

darribas commented 2 years ago

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:

By my own account, this would require:

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.

darribas commented 2 years ago

Started addressing issues above in #34. A few questions from that work:

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.

mfbenitezp commented 2 years ago

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

mfbenitezp commented 2 years ago

@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.

darribas commented 2 years ago

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.

darribas commented 2 years ago

This is the error I get when building the Rust lib (any suggestions @dabreegster ?):

Click to expand ``` ------ > [6/9] RUN cd /home/jovyan/spc && cargo build --release: #10 0.705 Updating git repository `https://github.com/mitsuhiko/indicatif` #10 1.909 Updating crates.io index #10 44.57 Downloading crates ... #10 45.00 Downloaded number_prefix v0.4.0 #10 45.00 Downloaded miniz_oxide v0.4.4 #10 45.00 Downloaded pin-project-lite v0.2.8 #10 45.01 Downloaded autocfg v1.1.0 #10 45.01 Downloaded multimap v0.8.3 #10 45.03 Downloaded opaque-debug v0.2.3 #10 45.04 Downloaded openssl-probe v0.1.5 #10 45.04 Downloaded pin-utils v0.1.0 #10 45.06 Downloaded pest_generator v2.1.3 #10 45.06 Downloaded pest_derive v2.1.0 #10 45.06 Downloaded percent-encoding v2.1.0 #10 45.06 Downloaded peeking_take_while v0.1.2 #10 45.06 Downloaded itoa v1.0.1 #10 45.07 Downloaded proc-macro-error-attr v1.0.4 #10 45.08 Downloaded itoa v0.4.8 #10 45.08 Downloaded mime v0.3.16 #10 45.09 Downloaded minimal-lexical v0.2.1 #10 45.09 Downloaded log v0.4.16 #10 45.10 Downloaded num-integer v0.1.44 #10 45.10 Downloaded native-tls v0.2.10 #10 45.11 Downloaded mio v0.8.2 #10 45.11 Downloaded nom v7.1.1 #10 45.12 Downloaded once_cell v1.10.0 #10 45.17 Downloaded num-bigint v0.4.3 #10 45.19 Downloaded num-traits v0.2.14 #10 45.21 Downloaded openssl-sys v0.9.72 #10 45.44 Downloaded parking_lot v0.12.0 #10 45.45 Downloaded ppv-lite86 v0.2.16 #10 45.45 Downloaded pkg-config v0.3.25 #10 45.45 Downloaded pest_meta v2.1.3 #10 45.45 Downloaded prost v0.9.0 #10 45.45 Downloaded proc-macro-error v1.0.4 #10 45.46 Downloaded pest v2.1.3 #10 45.47 Downloaded openssl v0.10.38 #10 45.48 Downloaded prost-derive v0.9.0 #10 45.48 Downloaded proc-macro2 v1.0.37 #10 45.50 Downloaded ndarray v0.15.4 #10 45.94 Downloaded ndarray-npy v0.8.1 #10 45.94 Downloaded ndarray-rand v0.14.0 #10 46.02 Downloaded serde_json v1.0.79 #10 46.03 Downloaded parking_lot_core v0.9.2 #10 46.03 Downloaded prost-types v0.9.0 #10 46.03 Downloaded proj v0.25.2 #10 46.03 Downloaded ordered-float v2.10.0 #10 46.11 Downloaded shlex v1.1.0 #10 46.11 Downloaded rustc-hash v1.1.0 #10 46.11 Downloaded remove_dir_all v0.5.3 #10 46.13 Downloaded stable_deref_trait v1.2.0 #10 46.13 Downloaded scopeguard v1.1.0 #10 46.14 Downloaded strsim v0.10.0 #10 46.14 Downloaded strsim v0.8.0 #10 46.22 Downloaded thiserror v1.0.30 #10 46.22 Downloaded thiserror-impl v1.0.30 #10 46.24 Downloaded rand_core v0.6.3 #10 46.27 Downloaded rawpointer v0.2.1 #10 46.29 Downloaded rand v0.8.5 #10 46.33 Downloaded rayon-core v1.9.1 #10 46.35 Downloaded regex-automata v0.1.10 #10 46.36 Downloaded smallvec v1.8.0 #10 46.36 Downloaded slab v0.4.6 #10 46.36 Downloaded quote v1.0.18 #10 46.36 Downloaded signal-hook-registry v1.4.0 #10 46.36 Downloaded rand_chacha v0.3.1 #10 46.38 Downloaded semver v1.0.7 #10 46.43 Downloaded tinyvec_macros v0.1.0 #10 46.49 Downloaded reqwest v0.11.10 #10 46.52 Downloaded rand_distr v0.4.3 #10 46.53 Downloaded py_literal v0.4.0 #10 46.54 Downloaded robust v0.2.3 #10 46.61 Downloaded rstar v0.8.4 #10 46.62 Downloaded sha-1 v0.8.2 #10 46.62 Downloaded regex v1.5.5 #10 46.67 Downloaded shapefile v0.3.0 #10 46.67 Downloaded pdqselect v0.1.0 #10 46.70 Downloaded tracing v0.1.33 #10 46.77 Downloaded thread_local v1.1.4 #10 46.77 Downloaded syn v1.0.91 #10 46.78 Downloaded tracing-core v0.1.24 #10 46.80 Downloaded crc32fast v1.3.2 #10 46.80 Downloaded lazy_static v1.4.0 #10 46.80 Downloaded lazycell v1.3.0 #10 46.82 Downloaded tokio-macros v1.7.0 #10 46.88 Downloaded tar v0.4.38 #10 46.88 Downloaded time v0.1.43 #10 46.89 Downloaded terminal_size v0.1.17 #10 46.89 Downloaded termcolor v1.1.3 #10 46.93 Downloaded matches v0.1.9 #10 46.93 Downloaded itertools v0.10.3 #10 46.95 Downloaded matchers v0.0.1 #10 46.95 Downloaded maplit v1.0.2 #10 47.01 Downloaded num_cpus v1.13.1 #10 47.03 Downloaded serde_urlencoded v0.7.1 #10 47.05 Downloaded tracing-serde v0.1.3 #10 47.07 Downloaded tower-service v0.3.1 #10 47.07 Downloaded rustc_version v0.4.0 #10 47.09 Downloaded socket2 v0.4.4 #10 47.12 Downloaded try-lock v0.2.3 #10 47.14 Downloaded tokio-native-tls v0.3.0 #10 47.16 Downloaded typed-index-collections v3.0.3 #10 47.19 Downloaded textwrap v0.15.0 #10 47.20 Downloaded tokio-util v0.6.9 #10 47.20 Downloaded tinyvec v1.5.1 #10 47.21 Downloaded tempfile v3.3.0 #10 47.21 Downloaded textwrap v0.11.0 #10 47.23 Downloaded libc v0.2.122 #10 47.26 Downloaded tracing-attributes v0.1.20 #10 47.26 Downloaded xattr v0.2.2 #10 47.30 Downloaded lock_api v0.4.7 #10 47.30 Downloaded libloading v0.7.3 #10 47.31 Downloaded os_str_bytes v6.0.0 #10 47.40 Downloaded libm v0.2.2 #10 47.46 Downloaded atty v0.2.14 #10 47.46 Downloaded adler v1.0.2 #10 47.47 Downloaded approx v0.4.0 #10 47.48 Downloaded memchr v2.4.1 #10 47.54 Downloaded as-slice v0.1.5 #10 47.56 Downloaded ansi_term v0.12.1 #10 47.57 Downloaded anyhow v1.0.56 #10 47.57 Downloaded sharded-slab v0.1.4 #10 47.58 Downloaded typenum v1.15.0 #10 47.58 Downloaded serde v1.0.136 #10 47.60 Downloaded num-complex v0.4.0 #10 47.63 Downloaded aho-corasick v0.7.18 #10 47.65 Downloaded matrixmultiply v0.3.2 #10 47.70 Downloaded serde_derive v1.0.136 #10 47.70 Downloaded tracing-log v0.1.2 #10 47.71 Downloaded base64 v0.13.0 #10 47.74 Downloaded ryu v1.0.9 #10 47.80 Downloaded bindgen v0.59.2 #10 47.81 Downloaded bitflags v1.3.2 #10 47.83 Downloaded unicode-normalization v0.1.19 #10 47.86 Downloaded block-padding v0.1.5 #10 47.86 Downloaded bincode v1.3.3 #10 47.87 Downloaded block-buffer v0.7.3 #10 47.92 Downloaded cc v1.0.73 #10 47.92 Downloaded cap v0.1.0 #10 47.96 Downloaded rayon v1.5.1 #10 48.04 Downloaded tokio-util v0.7.1 #10 48.09 Downloaded clap v3.1.8 #10 48.10 Downloaded byte-tools v0.3.1 #10 48.10 Downloaded want v0.3.0 #10 48.16 Downloaded cfg-if v1.0.0 #10 48.23 Downloaded petgraph v0.6.0 #10 48.26 Downloaded vec_map v0.8.2 #10 48.26 Downloaded which v4.2.5 #10 48.32 Downloaded zip v0.5.13 #10 48.32 Downloaded crossbeam-epoch v0.9.8 #10 48.35 Downloaded convert_case v0.4.0 #10 48.35 Downloaded dbase v0.2.3 #10 48.35 Downloaded cexpr v0.6.0 #10 48.35 Downloaded clang-sys v1.3.1 #10 48.36 Downloaded byteorder v1.4.3 #10 48.36 Downloaded enum-map-derive v0.6.0 #10 48.36 Downloaded digest v0.8.1 #10 48.37 Downloaded cmake v0.1.48 #10 48.37 Downloaded bytes v1.1.0 #10 48.38 Downloaded enum-map v1.1.1 #10 48.39 Downloaded fixedbitset v0.4.1 #10 48.40 Downloaded clap_derive v3.1.7 #10 48.41 Downloaded generic-array v0.12.4 #10 48.41 Downloaded console v0.15.0 #10 48.42 Downloaded unicode-xid v0.2.2 #10 48.42 Downloaded unicode-width v0.1.9 #10 48.42 Downloaded unicode-bidi v0.3.7 #10 48.46 Downloaded version_check v0.9.4 #10 48.46 Downloaded ucd-trie v0.1.3 #10 48.53 Downloaded unicode-segmentation v1.9.0 #10 48.57 Downloaded chrono v0.4.19 #10 48.68 Downloaded tracing-subscriber v0.2.25 #10 48.69 Downloaded clap v2.34.0 #10 48.70 Downloaded futures-core v0.3.21 #10 48.70 Downloaded futures-macro v0.3.21 #10 48.71 Downloaded getrandom v0.2.6 #10 48.71 Downloaded url v2.2.2 #10 48.72 Downloaded heck v0.3.3 #10 48.74 Downloaded humantime v2.1.0 #10 48.75 Downloaded hash32 v0.1.1 #10 48.78 Downloaded either v1.6.1 #10 48.84 Downloaded foreign-types-shared v0.1.1 #10 48.85 Downloaded foreign-types v0.3.2 #10 48.85 Downloaded fake-simd v0.1.2 #10 48.87 Downloaded futures-sink v0.3.21 #10 48.87 Downloaded fastrand v1.7.0 #10 48.94 Downloaded fnv v1.0.7 #10 48.94 Downloaded geo v0.20.0 #10 48.95 Downloaded httpdate v1.0.2 #10 48.95 Downloaded form_urlencoded v1.0.1 #10 48.95 Downloaded geo-types v0.7.4 #10 48.95 Downloaded futures-task v0.3.21 #10 48.98 Downloaded generic-array v0.13.3 #10 48.99 Downloaded csv-core v0.1.10 #10 48.99 Downloaded crossbeam-deque v0.8.1 #10 49.00 Downloaded derive_more v0.99.17 #10 49.03 Downloaded env_logger v0.9.0 #10 49.04 Downloaded flate2 v1.0.22 #10 49.11 Downloaded futures-channel v0.3.21 #10 49.11 Downloaded generic-array v0.14.5 #10 49.12 Downloaded fs-err v2.7.0 #10 49.12 Downloaded hyper v0.14.18 #10 49.13 Downloaded crossbeam-utils v0.8.8 #10 49.13 Downloaded filetime v0.2.15 #10 49.14 Downloaded hashbrown v0.11.2 #10 49.21 Downloaded geographiclib-rs v0.2.1 #10 49.33 Downloaded regex-syntax v0.6.25 #10 49.46 Downloaded geojson v0.22.3 #10 49.47 Downloaded futures-util v0.3.21 #10 49.69 Downloaded glob v0.3.0 #10 49.75 Downloaded crossbeam-channel v0.5.4 #10 49.75 Downloaded hyper-tls v0.5.0 #10 49.76 Downloaded httparse v1.6.0 #10 49.76 Downloaded http-body v0.4.4 #10 49.88 Downloaded h2 v0.3.13 #10 49.88 Downloaded http v0.2.6 #10 49.89 Downloaded heck v0.4.0 #10 49.89 Downloaded heapless v0.6.1 #10 49.91 Downloaded indexmap v1.8.1 #10 50.14 Downloaded idna v0.2.3 #10 50.25 Downloaded memoffset v0.6.5 #10 50.25 Downloaded ipnet v2.4.0 #10 50.44 Downloaded tokio v1.17.0 #10 50.50 Downloaded bstr v0.2.17 #10 51.05 Downloaded csv v1.1.6 #10 51.78 Downloaded encoding_rs v0.8.31 #10 55.82 Downloaded proj-sys v0.22.0 #10 56.82 Downloaded prost-build v0.9.0 #10 57.09 Compiling autocfg v1.1.0 #10 57.09 Compiling libc v0.2.122 #10 57.09 Compiling proc-macro2 v1.0.37 #10 57.09 Compiling unicode-xid v0.2.2 #10 57.09 Compiling syn v1.0.91 #10 57.09 Compiling cfg-if v1.0.0 #10 57.09 Compiling memchr v2.4.1 #10 57.09 Compiling log v0.4.16 #10 57.52 Compiling lazy_static v1.4.0 #10 57.61 Compiling libm v0.2.2 #10 57.88 Compiling version_check v0.9.4 #10 58.15 Compiling serde_derive v1.0.136 #10 58.23 Compiling serde v1.0.136 #10 58.29 Compiling smallvec v1.8.0 #10 58.35 Compiling either v1.6.1 #10 58.35 Compiling cc v1.0.73 #10 58.36 Compiling pkg-config v0.3.25 #10 58.41 Compiling once_cell v1.10.0 #10 58.65 Compiling scopeguard v1.1.0 #10 58.78 Compiling typenum v1.15.0 #10 58.81 Compiling crc32fast v1.3.2 #10 58.83 Compiling pin-project-lite v0.2.8 #10 58.86 Compiling byteorder v1.4.3 #10 58.89 Compiling parking_lot_core v0.9.2 #10 58.96 Compiling regex-syntax v0.6.25 #10 59.04 Compiling anyhow v1.0.56 #10 59.48 Compiling bytes v1.1.0 #10 59.50 Compiling futures-core v0.3.21 #10 59.55 Compiling itoa v1.0.1 #10 59.64 Compiling glob v0.3.0 #10 59.85 Compiling stable_deref_trait v1.2.0 #10 59.90 Compiling unicode-width v0.1.9 #10 60.01 Compiling minimal-lexical v0.2.1 #10 60.04 Compiling heapless v0.6.1 #10 60.14 Compiling crossbeam-utils v0.8.8 #10 60.71 Compiling bitflags v1.3.2 #10 60.71 Compiling termcolor v1.1.3 #10 60.80 Compiling strsim v0.8.0 #10 60.82 Compiling humantime v2.1.0 #10 60.89 Compiling futures-task v0.3.21 #10 61.07 Compiling ansi_term v0.12.1 #10 61.32 Compiling adler v1.0.2 #10 61.36 Compiling vec_map v0.8.2 #10 61.44 Compiling bindgen v0.59.2 #10 61.48 Compiling shlex v1.1.0 #10 61.55 Compiling peeking_take_while v0.1.2 #10 61.65 Compiling ucd-trie v0.1.3 #10 61.66 Compiling futures-sink v0.3.21 #10 61.74 Compiling ryu v1.0.9 #10 61.78 Compiling foreign-types-shared v0.1.1 #10 61.85 Compiling openssl v0.10.38 #10 61.85 Compiling rustc-hash v1.1.0 #10 61.94 Compiling lazycell v1.3.0 #10 62.04 Compiling fnv v1.0.7 #10 62.10 Compiling hashbrown v0.11.2 #10 62.16 Compiling futures-util v0.3.21 #10 62.22 Compiling pdqselect v0.1.0 #10 62.36 Compiling native-tls v0.2.10 #10 62.37 Compiling slab v0.4.6 #10 62.66 Compiling pin-utils v0.1.0 #10 62.72 Compiling httparse v1.6.0 #10 62.84 Compiling tinyvec_macros v0.1.0 #10 62.88 Compiling futures-channel v0.3.21 #10 63.02 Compiling maplit v1.0.2 #10 63.10 Compiling matches v0.1.9 #10 63.23 Compiling rawpointer v0.2.1 #10 63.25 Compiling remove_dir_all v0.5.3 #10 63.28 Compiling rayon-core v1.9.1 #10 63.30 Compiling try-lock v0.2.3 #10 63.40 Compiling serde_json v1.0.79 #10 63.42 Compiling unicode-segmentation v1.9.0 #10 63.42 Compiling ppv-lite86 v0.2.16 #10 63.49 Compiling fixedbitset v0.4.1 #10 63.67 Compiling openssl-probe v0.1.5 #10 63.76 Compiling fastrand v1.7.0 #10 64.02 Compiling percent-encoding v2.1.0 #10 64.12 Compiling multimap v0.8.3 #10 64.19 Compiling tower-service v0.3.1 #10 64.37 Compiling httpdate v1.0.2 #10 64.39 Compiling unicode-bidi v0.3.7 #10 64.45 Compiling encoding_rs v0.8.31 #10 64.48 Compiling heck v0.4.0 #10 64.81 Compiling ipnet v2.4.0 #10 64.99 Compiling convert_case v0.4.0 #10 65.11 Compiling base64 v0.13.0 #10 65.34 Compiling strsim v0.10.0 #10 65.99 Compiling mime v0.3.16 #10 66.12 Compiling textwrap v0.15.0 #10 66.45 Compiling itoa v0.4.8 #10 66.72 Compiling robust v0.2.3 #10 66.94 Compiling number_prefix v0.4.0 #10 67.24 Compiling fs-err v2.7.0 #10 67.27 Compiling cap v0.1.0 #10 67.33 Compiling tracing-core v0.1.24 #10 67.46 Compiling sharded-slab v0.1.4 #10 67.50 Compiling geographiclib-rs v0.2.1 #10 67.88 Compiling libloading v0.7.3 #10 68.13 Compiling num-traits v0.2.14 #10 68.25 Compiling miniz_oxide v0.4.4 #10 68.29 Compiling num-integer v0.1.44 #10 68.32 Compiling lock_api v0.4.7 #10 68.56 Compiling indexmap v1.8.1 #10 68.72 Compiling memoffset v0.6.5 #10 68.75 Compiling crossbeam-epoch v0.9.8 #10 68.96 Compiling num-bigint v0.4.3 #10 68.98 Compiling rayon v1.5.1 #10 69.09 Compiling itertools v0.10.3 #10 69.13 Compiling thread_local v1.1.4 #10 69.21 Compiling generic-array v0.14.5 #10 69.29 Compiling proc-macro-error-attr v1.0.4 #10 69.39 Compiling proc-macro-error v1.0.4 #10 69.67 Compiling cmake v0.1.48 #10 69.68 Compiling hash32 v0.1.1 #10 69.95 Compiling textwrap v0.11.0 #10 69.98 Compiling clang-sys v1.3.1 #10 70.08 Compiling openssl-sys v0.9.72 #10 70.14 Compiling pest v2.1.3 #10 70.17 Compiling foreign-types v0.3.2 #10 70.33 Compiling http v0.2.6 #10 70.44 Compiling tinyvec v1.5.1 #10 70.52 Compiling regex-automata v0.1.10 #10 70.73 Compiling regex v1.5.5 #10 71.21 Compiling matrixmultiply v0.3.2 #10 71.88 Compiling heck v0.3.3 #10 71.95 Compiling form_urlencoded v1.0.1 #10 80.04 Compiling pest_meta v2.1.3 #10 80.65 Compiling matchers v0.0.1 #10 80.91 Compiling unicode-normalization v0.1.19 #10 81.11 Compiling want v0.3.0 #10 81.23 Compiling tracing-log v0.1.2 #10 81.48 Compiling http-body v0.4.4 #10 81.69 Compiling aho-corasick v0.7.18 #10 81.72 Compiling nom v7.1.1 #10 81.95 Compiling csv-core v0.1.10 #10 82.71 Compiling os_str_bytes v6.0.0 #10 83.45 Compiling quote v1.0.18 #10 83.46 Compiling num_cpus v1.13.1 #10 83.70 Compiling socket2 v0.4.4 #10 84.33 Compiling mio v0.8.2 #10 84.35 Compiling signal-hook-registry v1.4.0 #10 84.59 Compiling getrandom v0.2.6 #10 84.74 Compiling time v0.1.43 #10 85.39 Compiling terminal_size v0.1.17 #10 85.72 Compiling atty v0.2.14 #10 85.96 Compiling filetime v0.2.15 #10 85.98 Compiling xattr v0.2.2 #10 86.12 Compiling which v4.2.5 #10 86.73 Compiling tempfile v3.3.0 #10 88.31 Compiling crossbeam-channel v0.5.4 #10 88.72 Compiling generic-array v0.13.3 #10 89.18 Compiling generic-array v0.12.4 #10 89.37 Compiling idna v0.2.3 #10 90.48 Compiling rand_core v0.6.3 #10 91.22 Compiling console v0.15.0 #10 91.32 Compiling cexpr v0.6.0 #10 92.05 Compiling tar v0.4.38 #10 93.44 Compiling clap v2.34.0 #10 94.98 Compiling prost-build v0.9.0 #10 95.93 Compiling parking_lot v0.12.0 #10 97.30 Compiling flate2 v1.0.22 #10 98.56 Compiling petgraph v0.6.0 #10 99.29 Compiling approx v0.4.0 #10 99.56 Compiling num-complex v0.4.0 #10 99.63 Compiling ordered-float v2.10.0 #10 100.4 Compiling as-slice v0.1.5 #10 100.5 Compiling url v2.2.2 #10 101.1 Compiling rand_chacha v0.3.1 #10 101.3 Compiling indicatif v0.17.0-beta.1 (https://github.com/mitsuhiko/indicatif?rev=0e57b21e7ab1752d3796f41fa310bbf96ce5f4ac#0e57b21e) #10 101.6 Compiling env_logger v0.9.0 #10 101.7 Compiling crossbeam-deque v0.8.1 #10 102.2 Compiling pest_generator v2.1.3 #10 103.5 Compiling chrono v0.4.19 #10 104.1 Compiling ndarray v0.15.4 #10 104.2 Compiling rand v0.8.5 #10 109.9 Compiling dbase v0.2.3 #10 110.0 Compiling rand_distr v0.4.3 #10 111.8 Compiling tokio-macros v1.7.0 #10 112.7 Compiling tracing-attributes v0.1.20 #10 112.9 Compiling thiserror-impl v1.0.30 #10 113.3 Compiling prost-derive v0.9.0 #10 113.4 Compiling futures-macro v0.3.21 #10 114.2 Compiling pest_derive v2.1.0 #10 114.5 Compiling clap_derive v3.1.7 #10 116.2 Compiling enum-map-derive v0.6.0 #10 116.6 Compiling derive_more v0.99.17 #10 117.9 Compiling rstar v0.8.4 #10 118.3 Compiling ndarray-rand v0.14.0 #10 118.9 Compiling tokio v1.17.0 #10 118.9 Compiling py_literal v0.4.0 #10 120.5 Compiling tracing v0.1.33 #10 121.4 Compiling thiserror v1.0.30 #10 121.6 Compiling prost v0.9.0 #10 123.1 Compiling clap v3.1.8 #10 124.5 Compiling zip v0.5.13 #10 124.7 Compiling prost-types v0.9.0 #10 125.5 Compiling proj-sys v0.22.0 #10 126.8 Compiling ndarray-npy v0.8.1 #10 128.4 Compiling tokio-util v0.7.1 #10 128.6 Compiling tokio-native-tls v0.3.0 #10 129.0 Compiling tokio-util v0.6.9 #10 131.7 Compiling h2 v0.3.13 #10 131.7 Compiling geo-types v0.7.4 #10 132.3 Compiling serde_urlencoded v0.7.1 #10 133.2 Compiling bstr v0.2.17 #10 133.3 Compiling tracing-serde v0.1.3 #10 133.7 Compiling typed-index-collections v3.0.3 #10 133.7 Compiling enum-map v1.1.1 #10 134.2 Compiling bincode v1.3.3 #10 134.3 Compiling spc v0.1.0 (/home/jovyan/spc) #10 135.6 Compiling shapefile v0.3.0 #10 136.6 Compiling geojson v0.22.3 #10 136.7 Compiling tracing-subscriber v0.2.25 #10 139.6 error: failed to run custom build command for `proj-sys v0.22.0` #10 139.6 #10 139.6 Caused by: #10 139.7 process didn't exit successfully: `/home/jovyan/spc/target/release/build/proj-sys-46f53a94638604e1/build-script-build` (exit status: 101) #10 139.7 --- stdout #10 139.7 CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None #10 139.7 CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None #10 139.7 HOST_CMAKE_TOOLCHAIN_FILE = None #10 139.7 CMAKE_TOOLCHAIN_FILE = None #10 139.7 CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None #10 139.7 CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None #10 139.7 HOST_CMAKE_GENERATOR = None #10 139.7 CMAKE_GENERATOR = None #10 139.7 CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None #10 139.7 CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None #10 139.7 HOST_CMAKE_PREFIX_PATH = None #10 139.7 CMAKE_PREFIX_PATH = None #10 139.7 CMAKE_x86_64-unknown-linux-gnu = None #10 139.7 CMAKE_x86_64_unknown_linux_gnu = None #10 139.7 HOST_CMAKE = None #10 139.7 CMAKE = None #10 139.7 running: "cmake" "/home/jovyan/.cargo/registry/src/github.com-1ecc6299db9ec823/proj-sys-0.22.0/PROJSRC/proj/proj-8.1.0" "-DBUILD_SHARED_LIBS=OFF" "-DBUILD_TESTING=OFF" "-DBUILD_CCT=OFF" "-DBUILD_CS2CS=OFF" "-DBUILD_GEOD=OFF" "-DBUILD_GIE=OFF" "-DBUILD_PROJ=OFF" "-DBUILD_PROJINFO=OFF" "-DBUILD_PROJSYNC=OFF" "-DENABLE_CURL=OFF" "-DENABLE_TIFF=OFF" "-DCMAKE_INSTALL_PREFIX=/home/jovyan/spc/target/release/build/proj-sys-cc8c8b0963af934f/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release" #10 139.7 -- The C compiler identification is GNU 9.4.0 #10 139.7 -- The CXX compiler identification is unknown #10 139.7 -- Check for working C compiler: /usr/bin/cc #10 139.7 -- Check for working C compiler: /usr/bin/cc -- works #10 139.7 -- Detecting C compiler ABI info #10 139.7 -- Detecting C compiler ABI info - done #10 139.7 -- Detecting C compile features #10 139.7 -- Detecting C compile features - done #10 139.7 -- Configuring incomplete, errors occurred! #10 139.7 See also "/home/jovyan/spc/target/release/build/proj-sys-cc8c8b0963af934f/out/build/CMakeFiles/CMakeOutput.log". #10 139.7 See also "/home/jovyan/spc/target/release/build/proj-sys-cc8c8b0963af934f/out/build/CMakeFiles/CMakeError.log". #10 139.7 #10 139.7 --- stderr #10 139.7 feature flags specified source build #10 139.7 building libproj from source #10 139.7 disabling tiff support #10 139.7 CMake Error at CMakeLists.txt:14 (project): #10 139.7 The CMAKE_CXX_COMPILER: #10 139.7 #10 139.7 c++ #10 139.7 #10 139.7 is not a full path and was not found in the PATH. #10 139.7 #10 139.7 Tell CMake where to find the compiler by setting either the environment #10 139.7 variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path #10 139.7 to the compiler, or to the compiler name if it is in the PATH. #10 139.7 #10 139.7 #10 139.7 thread 'main' panicked at ' #10 139.7 command did not execute successfully, got: exit status: 1 #10 139.7 #10 139.7 build script failed, must exit now', /home/jovyan/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5 #10 139.7 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace #10 139.7 warning: build failed, waiting for other jobs to finish... ------ ```
dabreegster commented 2 years ago

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.

dabreegster commented 2 years ago

(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.)

darribas commented 2 years ago

After @dabreegster's fix, this seems to be ready to go!