build(docker): remove custom build for libusb
This commit is contained in:
parent
b39ec8ec98
commit
000dd65054
39
Dockerfile
39
Dockerfile
@ -1,37 +1,3 @@
|
|||||||
FROM docker.io/library/debian as builder-lib-usb
|
|
||||||
ARG BUILD_DEPENDENCIES="autoconf \
|
|
||||||
automake \
|
|
||||||
build-essential \
|
|
||||||
libtool \
|
|
||||||
unzip \
|
|
||||||
curl \
|
|
||||||
ca-certificates \
|
|
||||||
udev"
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends ${BUILD_DEPENDENCIES} && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /opt
|
|
||||||
RUN curl -L https://github.com/libusb/libusb/archive/v1.0.22.zip --output v1.0.22.zip && \
|
|
||||||
unzip v1.0.22.zip
|
|
||||||
|
|
||||||
WORKDIR /opt/libusb-1.0.22
|
|
||||||
RUN ./bootstrap.sh && \
|
|
||||||
./configure --disable-udev --enable-shared && \
|
|
||||||
make -j4
|
|
||||||
|
|
||||||
WORKDIR /opt/libusb-1.0.22/libusb
|
|
||||||
RUN /bin/mkdir -p '/usr/local/lib' && \
|
|
||||||
/bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' && \
|
|
||||||
/bin/mkdir -p '/usr/local/include/libusb-1.0' && \
|
|
||||||
/usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' && \
|
|
||||||
/bin/mkdir -p '/usr/local/lib/pkgconfig'
|
|
||||||
|
|
||||||
#WORKDIR /opt/libusb-1.0.22/
|
|
||||||
#RUN /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' && \
|
|
||||||
# cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/ && \
|
|
||||||
# ldconfig
|
|
||||||
|
|
||||||
FROM docker.io/library/python:3.9-slim
|
FROM docker.io/library/python:3.9-slim
|
||||||
|
|
||||||
# Configure piwheels repo to use pre-compiled numpy wheels for arm
|
# Configure piwheels repo to use pre-compiled numpy wheels for arm
|
||||||
@ -39,8 +5,6 @@ RUN echo -n "[global]\nextra-index-url=https://www.piwheels.org/simple\n" >> /et
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
|
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
|
||||||
|
|
||||||
COPY --from=builder-lib-usb /usr/local/lib/ /usr/local/lib/
|
|
||||||
|
|
||||||
RUN pip3 install numpy
|
RUN pip3 install numpy
|
||||||
|
|
||||||
ADD requirements.txt requirements.txt
|
ADD requirements.txt requirements.txt
|
||||||
@ -52,12 +16,9 @@ ADD camera camera
|
|||||||
ADD setup.cfg setup.cfg
|
ADD setup.cfg setup.cfg
|
||||||
ADD setup.py setup.py
|
ADD setup.py setup.py
|
||||||
|
|
||||||
|
|
||||||
ENV PYTHON_EGG_CACHE=/tmp/cache
|
ENV PYTHON_EGG_CACHE=/tmp/cache
|
||||||
RUN python3 setup.py install
|
RUN python3 setup.py install
|
||||||
|
|
||||||
RUN echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | tee /etc/udev/rules.d/80-movidius.rules
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
USER 1234
|
USER 1234
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user