I want to build a python docker container that has scikit-learn, opencv, and numpy. Unfortunately, I couldn't find a pre-built container that contained all these, but I did find the one below that contains numpy and scikit-learn.
https://hub.docker.com/r/frolvlad/alpine-python-machinelearning/
I still needed to install opencv, so within my docker file I included a RUN pip install opencv-python. However, I keep on getting the error below:
Could not find a version that satisfies the requirement opencv-python (from version: )
No matching distribution found for opencv-python
Every single thing I have read online says that a pip install opencv-python will work, but it isn't working for me for some reason. Is it a problem with the python package maybe?
Any help is appreciated
Also, I will include my full Dockerfile below, I am aiming to use openFaas, which is a serverless framework, so my Dockerfile might look odd:
FROM frolvlad/alpine-python-machinelearning
RUN apk update
RUN apk upgrade
# Alternatively use ADD https:// (which will not be cached by Docker builder)
RUN apk --no-cache add curl \
&& echo "Pulling watchdog binary from Github." \
&& curl -sSL
https://github.com/openfaas/faas/releases/download/0.8.0/fwatchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
# Add non root user
RUN addgroup -S app && adduser -S -g app app
RUN chown app /home/app
RUN pip install -U pip
USER app
ENV PATH=$PATH:/home/app/.local/bin
WORKDIR /home/app/
RUN pip install opencv-python
RUN mkdir -p function
RUN touch ./function/__init__.py
WORKDIR /home/app/function/
RUN pip install --user app opencv-python
WORKDIR /home/app/
COPY function function
ENV fprocess="python index.py"
HEALTHCHECK --interval=1s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]