-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.amd64
More file actions
executable file
·89 lines (77 loc) · 2.48 KB
/
Dockerfile.amd64
File metadata and controls
executable file
·89 lines (77 loc) · 2.48 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install software-properties-common -y
#install python3.7
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y python3.7
RUN ( cd /usr/bin; rm -f python3; ln -s python3.7 python3 )
RUN ls -la /usr/bin/python*
RUN python3 --version
# Install system packages
RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y \
python3-dev \
python3.7-distutils \
python3-pip \
python3-pil \
python3-lxml \
python3-tk \
build-essential \
cmake \
git \
libgtk2.0-dev \
pkg-config \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
x11-apps \
wget \
vim \
ffmpeg \
unzip \
python3-opencv \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
RUN ls -la /usr/bin/python*
RUN python3 --version
# set up link to "python3" from "python"
RUN ( cd /usr/bin; ln -s python3 python )
# Install core packages
#RUN wget -q -O /tmp/get-pip.py --no-check-certificate https://bootstrap.pypa.io/get-pip.py && python3 /tmp/get-pip.py
RUN python3.7 -m pip install \
tensorflow==2.10.0 \
tensorflow-io==0.27.0 \
tf_slim==1.1.0 \
scipy==1.7.3 \
numpy==1.21.6 \
matplotlib==3.5.3 \
pandas==1.3.5 \
pillow==9.2.0 \
requests==2.22.0 \
protobuf==3.19.6 \
pyyaml==5.4.1 \
gin-config==0.5.0 \
setuptools==65.4.1 \
cython==0.29.32 \
opencv-python==4.6.0.66
# Setting up working directory
RUN mkdir /lab
WORKDIR /lab
# install tensorflow addons
RUN pip3 install tensorflow_addons==0.18.0
# Install tensorflow models object detection
RUN GIT_SSL_NO_VERIFY=true git clone -q https://github.com/tensorflow/models /usr/local/lib/python3.7/dist-packages/tensorflow/models
RUN ( cd /usr/local/lib/python3.7/dist-packages/tensorflow/models/research; cp object_detection/packages/tf2/setup.py . ; python3 -m pip install --force --no-dependencies . )
# Minimize image size
RUN (apt-get autoremove -y; \
apt-get autoclean -y)
# Set TF object detection available
ENV PYTHONPATH "$PYTHONPATH:/usr/local/lib/python3.7/dist-packages/tensorflow/models:/usr/local/lib/python3.7/dist-packages/tensorflow/models/research:/usr/local/lib/python3.7/dist-packages/tensorflow/models/research/slim"
RUN cd /usr/local/lib/python3.7/dist-packages/tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=.
CMD bash exec.sh