Skip to content

CPU wont build on docker with windows 11 #142

@codewizdevs

Description

@codewizdevs

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"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions