File size: 1,661 Bytes
90226e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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"]