-
Notifications
You must be signed in to change notification settings - Fork 475
/
Dockerfile.meta
29 lines (24 loc) · 1.09 KB
/
Dockerfile.meta
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
#
# opencv-python meta-package builder that installs opencv-contrib-python
#
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG OPENCV_VERSION
WORKDIR /opt/opencv-python-meta
RUN echo "[build-system]" >> pyproject.toml && \
echo "build-backend = 'setuptools.build_meta'" >> pyproject.toml && \
echo "requires = ['setuptools']" >> pyproject.toml
RUN echo "[metadata]" >> setup.cfg && \
echo "name = opencv-python" >> setup.cfg && \
echo "version = ${OPENCV_VERSION}" >> setup.cfg && \
echo "description = opencv-python ${OPENCV_VERSION} (with CUDA)" >> setup.cfg && \
echo "authors = opencv" >> setup.cfg && \
echo "license = MIT" >> setup.cfg && \
echo "" >> setup.cfg && \
echo "[options]" >> setup.cfg && \
echo "install_requires =" >> setup.cfg && \
echo " opencv-contrib-python~=${OPENCV_VERSION}" >> setup.cfg
RUN cat pyproject.toml && cat setup.cfg
RUN pip3 wheel --wheel-dir=/opt --no-deps --verbose .
RUN twine upload --verbose /opt/opencv_python*.whl || echo "failed to upload wheel to ${TWINE_REPOSITORY_URL}"
RUN pip3 install --no-cache-dir --verbose opencv-python