-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
47 lines (36 loc) · 1.36 KB
/
Dockerfile
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
FROM python:3.8-buster as base
WORKDIR /opt
COPY docker/common/install-basic-deps.sh .
RUN bash /opt/install-basic-deps.sh
FROM base as chef
ENV PATH="/root/.cargo/bin:$PATH"
RUN rustc -V
FROM chef AS planner
WORKDIR /opt
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
WORKDIR /opt
COPY --from=planner /opt/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
ENV RUSTFLAGS=" -C target-cpu=native -C opt-level=3"
RUN maturin build --release --out dist
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install dist/*.whl
RUN python3 -m pip install -r /opt/python/motchallenge/requirements.txt
# add original Sort (https://github.com/abewley/sort)
RUN git clone https://github.com/abewley/sort.git /tmp/sort \
&& python3 -m pip install -r /tmp/sort/requirements.txt \
&& cp /tmp/sort/sort.py /opt/python/motchallenge/original_sort.py \
&& rm -r /tmp/sort
# install package with MOTChallenge Official Evaluation Kit
# https://github.com/JonathonLuiten/TrackEval/tree/master/docs/MOTChallenge-Official
RUN git clone https://github.com/JonathonLuiten/TrackEval.git /tmp/TrackEval \
&& cd /tmp/TrackEval \
&& python3 setup.py install \
&& rm -rf /tmp/TrackEval
WORKDIR /opt/python
VOLUME /data
CMD ["/opt/python/motchallenge/config.yml"]
ENTRYPOINT ["python3", "-m", "motchallenge"]