forked from cameronslee/clippi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (56 loc) · 1.52 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM python:3.11.3-slim-bullseye
# system dependencies
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 \
apt-transport-https \
libcanberra-gtk-module \
libcanberra-gtk3-module \
dbus-x11 \
iputils-ping \
python3-dev \
python3-pip \
python3-setuptools
# some image/media dependencies
RUN apt-get -y update && apt-get install -y \
libjpeg62-turbo-dev \
libpng-dev \
libtiff5-dev \
libtiff-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libdc1394-22-dev \
libxine2-dev \
libavfilter-dev \
libavutil-dev \
ffmpeg
RUN apt-get clean && rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* && apt-get -y autoremove
# install decord
RUN git clone --recursive https://github.com/dmlc/decord
# TODO, built this on a mac so cuda is off. will update if tested on a machine that supports it
RUN cd decord && mkdir build && cd build && cmake .. -DUSE_CUDA=OFF -DCMAKE_BUILD_TYPE=Release && make -j2 && cd ../python && python3 setup.py install
WORKDIR /usr/src/app
COPY . .
# pip
RUN pip install --upgrade pip \
&& pip install -r requirements.txt
# spacy dataset
RUN python3 -m spacy download en_core_web_sm
# ultimate user
ARG USER=fossa
ARG USER_UID=1001
RUN useradd -m -s /bin/bash -u $USER_UID $USER
RUN usermod -aG sudo $USER
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER $USER