FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive # Install apt-getable dependencies RUN apt-get update \ && apt-get install -y \ build-essential \ cmake \ git \ libeigen3-dev \ libopencv-dev \ libceres-dev \ python3-dev \ curl \ pkg-config \ libcairo2-dev \ software-properties-common \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Mapmachine requirements RUN add-apt-repository ppa:ubuntugis/ppa && \ apt-get update && \ apt-get -y install libgeos-dev RUN add-apt-repository ppa:deadsnakes/ppa && \ apt-get update && \ apt install -y python3.9-dev && \ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ python3.9 get-pip.py ARG REINSTALL_MAPMACHINE=1 RUN pip3.9 install git+https://github.com/tonyzzzzzz/map-machine WORKDIR /home/ # OrienterNet Requirements TODO: Install directly from our requirements once our repo is public RUN git clone https://github.com/mapillary/OpenSfM.git && cd OpenSfM && \ pip3.9 install -r requirements.txt RUN git clone https://github.com/facebookresearch/OrienterNet.git && cd OrienterNet && \ pip3 install -r requirements/full.txt # MapPerceptionNet extra requirements RUN pip3.9 install geojson shapely geopandas mercantile turfpy vt2geojson folium fastapi\ geopy gradio pyarrow cloudpickle==2.0.0 urllib3~=1.25.6 scikit-image filelock hydra-core ARG CACHE_RESET=1 RUN useradd -m -u 1000 user USER user WORKDIR /app RUN git clone https://github.com/MapItAnywhere/MapItAnywhere.git COPY --chown=user . /app CMD ["python3.9", "-m", "main"]