-
Notifications
You must be signed in to change notification settings - Fork 0
/
face-gpu.Dockerfile
80 lines (70 loc) · 2.07 KB
/
face-gpu.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
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
FROM nvidia/cuda:11.2.2-cudnn8-devel
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV PYTHONIOENCODING=utf-8
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all
ENV MXNET_CUDNN_AUTOTUNE_DEFAULT=0
ENV MXNET_CUDNN_LIB_CHECKING=0
RUN apt-get -y update && apt-get install -y \
software-properties-common \
build-essential \
checkinstall \
cmake \
make \
pkg-config \
yasm \
git \
vim \
curl \
wget \
sudo \
nano \
apt-transport-https \
libcanberra-gtk-module \
libcanberra-gtk3-module \
dbus-x11 \
iputils-ping \
python3-dev \
python3-pip \
python3-setuptools \
unzip
# some image/media dependencies
RUN apt-get -y update && apt-get install -y \
libjpeg8-dev \
libpng-dev \
libtiff5-dev \
libtiff-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libdc1394-22-dev \
libxine2-dev \
libavfilter-dev \
libavutil-dev
RUN apt-get -y update && apt-get install -y ffmpeg
# Build decord with Nvidia decoder
RUN ln -s /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1 /usr/local/cuda/lib64/libnvcuvid.so
RUN git clone --recursive https://github.com/dmlc/decord
RUN cd decord && mkdir build && cd build && cmake .. -DUSE_CUDA=ON -DCMAKE_BUILD_TYPE=Release && make -j2 && cd ../python && python3 setup.py install
# Set up files and install python libraries
RUN mkdir /face
ADD . /face
WORKDIR /face
RUN apt-get install -y libcairo2-dev
RUN pip3 install --upgrade pip setuptools wheel
RUN pip3 install cython
RUN pip3 install -r requirements.txt
RUN git clone https://github.com/dchen236/FairFace.git
# Fallback - if pip install above does not work, use this unversioned command
# RUN pip3 install cython numpy decord tqdm scikit-image mxnet-cu112 cython insightface keras tensorflow numpy
# Build c extensions for CNN
WORKDIR /face/face/rcnn/cython
RUN python3 setup.py build_ext --inplace
WORKDIR /face/face/rcnn/pycocotools
RUN python3 setup.py build_ext --inplace
# Run analysis
WORKDIR /face
CMD bash pipeline.sh