-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile_GPU
More file actions
86 lines (74 loc) · 2.09 KB
/
Dockerfile_GPU
File metadata and controls
86 lines (74 loc) · 2.09 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
FROM nvidia/cuda:11.4.2-cudnn8-devel-ubuntu18.04
LABEL maintainer="yKesamaru <y.kesamaru@tokai-kaoninsho.com>"
ARG DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES utility,compute
RUN apt -y update
RUN apt install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-base-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
python3-numpy \
software-properties-common \
zip \
ffmpeg \
libpng-dev \
libopenexr-dev \
libwebp-dev \
python3-setuptools \
python3-pip \
python-pip-whl \
python3-tk \
libsm6 \
libxext6 \
libxrender-dev \
# ubuntu-desktop \
xserver-xorg \
&& apt clean && rm -rf /tmp/* /var/tmp/*
RUN pip3 install -U pip
# Install dlib
RUN git clone https://github.com/davisking/dlib.git
WORKDIR /dlib
RUN mkdir ./build
RUN cmake -H/dlib -B/dlib/build -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1
RUN cmake --build /dlib/build
RUN python3 setup.py install
# Download shape_predictor_5_face_landmarks.dat.bz2 for the Dlib python example.
WORKDIR /dlib/python_examples
RUN wget http://dlib.net/files/shape_predictor_5_face_landmarks.dat.bz2
RUN bunzip2 shape_predictor_5_face_landmarks.dat.bz2
# For example: python3 face_jitter.py shape_predictor_5_face_landmarks.dat
# others: sudo apt -y install x11-apps; xeyes
# set local
# RUN locale-gen en_US.UTF-8
# ENV LANG en_US.UTF-8
# ENV LANGUAGE en_US:en
# ENV LC_ALL en_US.UTF-8
# RUN export LC_ALL=C.UTF-8 && \
# export LANG=C.UTF-8
# Install Disaster
RUN mkdir /root/disaster/
COPY . /root/disaster
WORKDIR /root/disaster
RUN python3 -m pip install -r requirements.txt
CMD export LC_ALL=C.UTF-8 && \
export LANG=C.UTF-8 && \
# cd /root/disaster/create_face_data/shelter01/ && \
# python3 ./create_face_data_app.py && \
cd /root/disaster/web_app/ && \
export FLASK_APP=main.py && \
flask run --host=0.0.0.0