Skip to content

Commit 1781b30

Browse files
committed
finished Dockerfile
1 parent cdeff2e commit 1781b30

File tree

988 files changed

+52
-733238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

988 files changed

+52
-733238
lines changed

Dockerfile

+52-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:18.04 AS builder
22

33
WORKDIR /home/video_cap
44

@@ -11,10 +11,61 @@ RUN mkdir -p /home/video_cap && \
1111
chmod +x install.sh && \
1212
./install.sh
1313

14+
# Install debugging tools
15+
RUN apt-get update && \
16+
apt-get -y install \
17+
gdb \
18+
python3-dbg
19+
20+
FROM ubuntu:18.04
21+
22+
# install Python
23+
RUN apt-get update && \
24+
apt-get upgrade -y && \
25+
apt-get install -y \
26+
pkg-config \
27+
python3-dev \
28+
python3-pip \
29+
python3-numpy \
30+
python3-pkgconfig && \
31+
rm -rf /var/lib/apt/lists/*
32+
33+
RUN apt-get update -qq && \
34+
apt-get -y install \
35+
libgtk-3-dev \
36+
libavcodec-dev \
37+
libavformat-dev \
38+
libswscale-dev \
39+
libmp3lame-dev \
40+
zlib1g-dev \
41+
libx264-dev \
42+
libsdl2-dev \
43+
libvpx-dev \
44+
libvdpau-dev \
45+
libvorbis-dev \
46+
libopus-dev \
47+
libdc1394-22-dev \
48+
liblzma-dev && \
49+
rm -rf /var/lib/apt/lists/*
50+
51+
# copy libraries
52+
WORKDIR /usr/local/lib
53+
COPY --from=builder /usr/local/lib .
54+
WORKDIR /usr/local/include
55+
COPY --from=builder /home/ffmpeg_build/include .
56+
WORKDIR /home/ffmpeg_build/lib
57+
COPY --from=builder /home/ffmpeg_build/lib .
58+
WORKDIR /usr/local/include/opencv4/
59+
COPY --from=builder /usr/local/include/opencv4/ .
60+
WORKDIR /home/opencv/build/lib
61+
COPY --from=builder /home/opencv/build/lib .
62+
1463
# Set environment variables
1564
ENV PATH="$PATH:/home/bin"
1665
ENV PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/home/ffmpeg_build/lib/pkgconfig"
1766

67+
WORKDIR /home/video_cap
68+
1869
COPY setup.py /home/video_cap
1970
COPY src /home/video_cap/src/
2071

@@ -23,10 +74,4 @@ COPY vid.mp4 /home/video_cap
2374
RUN cd /home/video_cap && \
2475
python3 setup.py install
2576

26-
# Install debugging tools
27-
RUN apt-get update && \
28-
apt-get -y install \
29-
gdb \
30-
python3-dbg
31-
3277
CMD ["sh", "-c", "tail -f /dev/null"]

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import numpy as np
55

66
d = pkgconfig.parse('libavformat libswscale opencv4')
7-
print(d)
87

98
print("Numpy dir: ", np.get_include())
109

test_install/bin/activate

-76
This file was deleted.

test_install/bin/activate.csh

-37
This file was deleted.

test_install/bin/activate.fish

-75
This file was deleted.

test_install/bin/easy_install

-10
This file was deleted.

test_install/bin/easy_install-3.7

-10
This file was deleted.

test_install/bin/f2py

-8
This file was deleted.

test_install/bin/f2py3

-8
This file was deleted.

test_install/bin/f2py3.7

-8
This file was deleted.

test_install/bin/pip

-10
This file was deleted.

test_install/bin/pip3

-10
This file was deleted.

test_install/bin/pip3.7

-10
This file was deleted.

test_install/bin/python

-1
This file was deleted.

test_install/bin/python3

-1
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)