-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 1 KB
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 1 KB
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
# Use Caffe2 image as parent image
FROM caffe2/caffe2:snapshot-py2-cuda9.0-cudnn7-ubuntu16.04
RUN mv /usr/local/caffe2 /usr/local/caffe2_build
ENV Caffe2_DIR /usr/local/caffe2_build
ENV PYTHONPATH /usr/local/caffe2_build:${PYTHONPATH}
ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH}
# Clone the Detectron repository
RUN git clone https://github.com/facebookresearch/Detectron /detectron
RUN cd /detectron && git checkout d56e267 ## important ## struggle for long time ##
# Install Python dependencies
RUN pip install -r /detectron/requirements.txt
# Install the COCO API
RUN git clone https://github.com/cocodataset/cocoapi.git /cocoapi
WORKDIR /cocoapi/PythonAPI
RUN make install
# Go to Detectron root
WORKDIR /detectron
# Set up Python modules
RUN make
# [Optional] Build custom ops
RUN make ops
ADD model_iter19999.pkl /detectron/flags/
ADD model_final.pkl /detectron/flags/
ADD 101.yaml /detectron/flags/
ADD infer_csv.py /detectron/flags/
# not sure net.py
ADD env.py /detectron/detectron/utils/