-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerfile
47 lines (32 loc) · 1.34 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
# https://storage.googleapis.com/tfjs-models/savedmodel/
FROM tensorflow/tensorflow:latest-gpu-py3
WORKDIR /env
RUN python -m pip install --upgrade pip
RUN pip install -U setuptools
RUN pip install cython
#RUN apt install -y git && git --version
COPY ./env /env
# install protobuf
RUN apt install libprotobuf-dev protobuf-compiler golang-goprotobuf-dev -y
# install tensorflows models
#RUN git clone https://github.com/tensorflow/models.git
WORKDIR /env/models/research/
RUN protoc object_detection/protos/*.proto --python_out=.
ENV PYTHONPATH /env/models/research:/env/models:/env/models/research/slim
# install coco API
#RUN git clone https://github.com/cocodataset/cocoapi.git
WORKDIR /env/cocoapi/PythonAPI
RUN make -f /env/cocoapi/PythonAPI/Makefile
RUN cp -r pycocotools /env/models/research/
# install object deation API
WORKDIR /env/models/research/
# 国内
#RUN python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=100 .
# 需要翻墙
RUN python -m pip install .
# 此条命令是测试看看 COCO API 有没有正确安装
#RUN python object_detection/builders/model_builder_tf2_test.py
# train model
WORKDIR /env
#pre-trained-models/ssd_resnet50_v1_fpn/checkpoint/checkpoint
#RUN python model_main_tf2.py --model_dir=model/my_ssd_resnet50_v1_fpn --pipeline_config_path=model/my_ssd_resnet50_v1_fpn/pipeline.config