osmnx Docker & Self-Hosted Deployment

GitHub

Download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap.

5,786 stars Python Python 1 file ยท ~7,558 tokens #geography#geospatial#gis#mapping#networks#networkx#openstreetmap#osm
1. Pull Image (DOCKERHUB) docker pull gboeing/osmnx:latest
2. Docker Run (1-Click Launch) docker run -d --name osmnx --restart always gboeing/osmnx:latest
3. Podman Run podman run -d --name osmnx --restart always gboeing/osmnx:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/gboeing/osmnx:latest
5. ORAS Pull (OCI Artifact) oras pull gboeing/osmnx:latest
environments/docker/Dockerfile
FROM jupyter/base-notebook
LABEL maintainer="Geoff Boeing <[email protected]>"
LABEL url="https://osmnx.readthedocs.io"
LABEL description="OSMnx is a Python package to easily download, model, analyze, and visualize street networks and other geospatial features from OpenStreetMap."

# expose $TARGETPLATFORM to the install.sh script
ARG TARGETPLATFORM

# copy uv binaries and package files needed for installation
COPY --from=ghcr.io/astral-sh/uv:0.11 /uv /uvx /bin/
COPY --chown=jovyan --chmod=0755 ./environments/docker/install.sh ./osmnx/
COPY --chown=jovyan --chmod=0755 ./osmnx/ ./osmnx/osmnx/
COPY --chown=jovyan --chmod=0755 ./LICENSE.txt ./osmnx/
COPY --chown=jovyan --chmod=0755 ./pyproject.toml ./osmnx/
COPY --chown=jovyan --chmod=0755 ./README.md ./osmnx/

# install and configure everything in one RUN to keep image tidy
RUN cd ./osmnx && bash install.sh

# set jupyter working directory to map to mounted volume
WORKDIR /home/jovyan/work

# set default command to launch when container is run
CMD ["jupyter", "lab", "--ip='0.0.0.0'", "--port=8888", "--no-browser", "--NotebookApp.token=''", "--NotebookApp.password=''"]