-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from tum-bgd/tutorial
add the Tutorial and Docker Installation of AtlasHDF
- Loading branch information
Showing
8 changed files
with
814 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
*.h5 | ||
*.csv | ||
*.osm.pbf | ||
data | ||
atlashdf/atlashdf | ||
.vscode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# You may need to adapt this configuration in case you want to use this docker | ||
# file to build a wheel for your system. Take a builder image that fits your machine | ||
# and be prepared to update the installation of a matching protobuflite version. | ||
|
||
FROM python:3.10.9-bullseye AS builder | ||
|
||
# This stage is for building only. Output wheels are in `/atlashdf/dist`. | ||
# You can mount it or run the container and inspect what you have. | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libosmpbf-dev \ | ||
libhdf5-dev \ | ||
libboost-dev \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /atlashdf | ||
|
||
COPY ./ . | ||
|
||
# Build JQ | ||
WORKDIR /atlashdf/python_module/jq | ||
RUN autoreconf -vfi | ||
RUN ./configure --disable-maintainer-mode | ||
RUN make | ||
|
||
|
||
# Build atlashdf python wheel | ||
RUN pip3 install pybind11 | ||
WORKDIR /atlashdf/python_module | ||
RUN python3 setup.py bdist_wheel | ||
|
||
# Now, the wheel is in /atlashdf/python_module/dist and can be copied by running a container and mounting: | ||
# $ docker run -it -v dist:/out image-tag | ||
# root@f029b3ad9157:/atlashdf/python_module# cp dist/atlashdf-0.1-cp310-cp310-linux_x86_64.whl /out | ||
# root@f029b3ad9157:/atlashdf/python_module# exit | ||
# | ||
# Then, you can install this beast (but be sure to have all shared objects or use auditwheel to repair it) | ||
|
||
|
||
FROM jupyter/tensorflow-notebook AS jupyter | ||
|
||
USER root | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libosmpbf-dev \ | ||
libhdf5-dev \ | ||
libboost-dev \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
USER ${NB_UID} | ||
|
||
COPY --from=builder /atlashdf/python_module/dist/* ./ | ||
COPY --from=builder /atlashdf/assets/* assets/ | ||
COPY --from=builder /atlashdf/*.ipynb ./ | ||
|
||
RUN pip install atlashdf-0.1-cp310-cp310-linux_x86_64.whl | ||
RUN pip install rasterio |
Oops, something went wrong.