forked from osai-ai/tensor-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (51 loc) · 1.78 KB
/
Copy pathDockerfile
File metadata and controls
59 lines (51 loc) · 1.78 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
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
RUN apt-get update &&\
apt-get -y install build-essential yasm nasm cmake unzip git wget \
sysstat libtcmalloc-minimal4 pkgconf autoconf libtool flex bison \
python3 python3-pip python3-dev python3-setuptools &&\
ln -s /usr/bin/python3 /usr/bin/python &&\
ln -s /usr/bin/pip3 /usr/bin/pip &&\
apt-get clean &&\
apt-get autoremove &&\
rm -rf /var/lib/apt/lists/* &&\
rm -rf /var/cache/apt/archives/*
# Build nvidia codec headers
RUN git clone -b sdk/8.2 --single-branch https://git.videolan.org/git/ffmpeg/nv-codec-headers.git &&\
cd nv-codec-headers && make install &&\
cd .. && rm -rf nv-codec-headers
# Build ffmpeg with nvenc support
RUN git clone --depth 1 -b release/4.2 --single-branch https://github.com/FFmpeg/FFmpeg.git &&\
cd FFmpeg &&\
mkdir ffmpeg_build && cd ffmpeg_build &&\
../configure \
--enable-cuda \
--enable-cuvid \
--enable-shared \
--disable-static \
--disable-doc \
--extra-cflags=-I/usr/local/cuda/include \
--extra-ldflags=-L/usr/local/cuda/lib64 \
--extra-libs=-lpthread \
--nvccflags="-gencode arch=compute_75,code=sm_75" &&\
make -j$(nproc) && make install && ldconfig &&\
cd ../.. && rm -rf FFmpeg
RUN pip3 install --no-cache-dir \
twine==1.13.0 \
awscli==1.16.194 \
numpy==1.16.4 \
packaging
ARG TORCH_VERSION
# Install PyTorch
RUN pip3 install --no-cache-dir torch==$TORCH_VERSION
RUN git clone https://github.com/doxygen/doxygen.git &&\
cd doxygen &&\
git checkout dc89ac0 &&\
mkdir build &&\
cd build &&\
cmake -G "Unix Makefiles" .. &&\
make install &&\
cd ../.. && rm -rf doxygen
COPY . /app
WORKDIR /app
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES video,compute,utility