InsightFace-REST icon indicating copy to clipboard operation
InsightFace-REST copied to clipboard

CPU wont build on docker with windows 11

Open codewizdevs opened this issue 6 months ago • 6 comments

CPU variant does not build on windows 11 with latest docker, these 3 issues i had and resolved them:

  1. Had to upgrade python in Dockerfile_cpu to: FROM python:3.10.6-slim-bullseye

  2. Had to then force install numpy <2 added to same file: RUN pip install "numpy<2.0"

  3. Had to edit entrypoint.sh to convert CRLF lines to LF to make it compatible with windows.

Updated Dockerfile_cpu:

FROM python:3.10.6-slim-bullseye

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV PIP_INSTALL="python -m pip --no-cache-dir install --upgrade"

RUN apt-get update &&\
    apt-get install -y\
            libgl1-mesa-glx \
            libglib2.0-0 \
            protobuf-compiler \
            libprotoc-dev \
            libb64-0d \
            libgomp1 \
            gcc \
            g++ \
            build-essential \
            curl \
            libturbojpeg0 \
            git &&\
    rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN $PIP_INSTALL -r requirements.txt

# Force NumPy 1.x for compatibility with ONNXRuntime
RUN pip install "numpy<2.0"

WORKDIR /app
COPY if_rest /app/if_rest
COPY entrypoint.sh /app/entrypoint.sh

ENTRYPOINT [ "bash" ]
CMD ["entrypoint.sh"]

codewizdevs avatar Aug 14 '25 13:08 codewizdevs

Thanks, I'll check it later and update dockerfile

SthPhoenix avatar Sep 04 '25 14:09 SthPhoenix

Thanks, I'll check it later and update dockerfile Can you hurry up? I've been working on this all day and I'm about to break down

xyl123567 avatar Sep 04 '25 14:09 xyl123567

Thanks, I'll check it later and update dockerfile Can you hurry up? I've been working on this all day and I'm about to break down

Just copy/paste dockerfile above, it should be sufficient

SthPhoenix avatar Sep 04 '25 15:09 SthPhoenix

https://github.com/SthPhoenix/InsightFace-REST/issues/142#issuecomment-3254171723 yes,it works,thank you

xyl123567 avatar Sep 04 '25 15:09 xyl123567

Thanks, I'll check it later and update dockerfile Can you hurry up? I've been working on this all day and I'm about to break down

Just copy/paste dockerfile above, it should be sufficient

Can you add a method for face quality detection? I have this requirement, and I will try it myself first

xyl123567 avatar Sep 04 '25 15:09 xyl123567

thanks

niyozbek avatar Dec 03 '25 06:12 niyozbek