From bc51b621aed3d6d3edea9f6c51b6c900369bd94d Mon Sep 17 00:00:00 2001 From: Martin Kozlovsky Date: Wed, 9 Oct 2024 13:26:42 +0200 Subject: [PATCH] updated hailo image --- docker/bases/Dockerfile.base-hailo | 30 ------------------------- docker/hailo/Dockerfile | 24 +++++++++++++------- docker/hailo/Dockerfile.base | 36 ++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 38 deletions(-) delete mode 100644 docker/bases/Dockerfile.base-hailo create mode 100644 docker/hailo/Dockerfile.base diff --git a/docker/bases/Dockerfile.base-hailo b/docker/bases/Dockerfile.base-hailo deleted file mode 100644 index 8d027da..0000000 --- a/docker/bases/Dockerfile.base-hailo +++ /dev/null @@ -1,30 +0,0 @@ -FROM hailo_ai_sw_suite_2024-07:1 -USER root - -COPY requirements.txt requirements.txt - -RUN pip install --upgrade pip && \ - pip install -r requirements.txt && \ - pip install --extra-index-url \ - https://developer.download.nvidia.com/compute/redist \ - nvidia-dali-cuda110 && \ - pip install --extra-index-url \ - https://developer.download.nvidia.com/compute/redist \ - nvidia-dali-tf-plugin-cuda110 - -RUN rm -rf \ - /local/workspace/tappas \ - /opt/google \ - /local/workspace/doc \ - /local/workspace/hailort_examples \ - /usr/share \ - /usr/bin/docker* \ - /usr/bin/containerd* \ - /local/workspace/hailo_virtualenv/lib/python3.8/site-packages/hailo_tutorials - -RUN pip install pip-autoremove && \ - pip-autoremove -y torch jupyter plotly matplotlib ipython \ - tensorboard pip-autoremove && \ - pip install psutil && \ - pip cache purge && \ - rm -rf ~/.cache diff --git a/docker/hailo/Dockerfile b/docker/hailo/Dockerfile index 75b6ca5..99a6afd 100644 --- a/docker/hailo/Dockerfile +++ b/docker/hailo/Dockerfile @@ -2,18 +2,26 @@ # If you want to build the Model Converter Docker image, # please use the Dockerfile.public file instead. -FROM ghcr.io/luxonis/modelconverter-base-hailo:latest +ARG VERSION=2.23.0 + +FROM ghcr.io/luxonis/modelconverter-base-hailo:${VERSION}-latest + +ENV IN_DOCKER= +ENV VERSION=${VERSION} WORKDIR /app -COPY docker/hailo/entrypoint.sh /app/entrypoint.sh -RUN chmod +x /app/entrypoint.sh +COPY --link docker/hailo/entrypoint.sh /app/entrypoint.sh +COPY --link modelconverter pyproject.toml /app/modelconverter/ -COPY modelconverter pyproject.toml requirements.txt /app/modelconverter/ -RUN cd modelconverter -RUN cd modelconverter && pip install -e . --no-deps +RUN < /etc/profile.d/certifi.sh + echo "export SSL_CERT_FILE=$(python -m certifi)" \ + > /etc/profile.d/certifi.sh + + pip install -e ./modelconverter --no-deps --no-cache-dir + chmod +x /app/entrypoint.sh + +EOF -ENV IN_DOCKER= ENTRYPOINT ["/app/entrypoint.sh"] diff --git a/docker/hailo/Dockerfile.base b/docker/hailo/Dockerfile.base new file mode 100644 index 0000000..cb6c711 --- /dev/null +++ b/docker/hailo/Dockerfile.base @@ -0,0 +1,36 @@ +ARG VERSION=2024.07 + +FROM hailo_ai_sw_suite_${VERSION/./-}:1 as BASE +USER root + + +RUN pip install --upgrade pip + +COPY requirements.txt requirements.txt + +RUN pip install -r requirements.txt +RUN pip install --extra-index-url \ + https://developer.download.nvidia.com/compute/redist \ + nvidia-dali-cuda110 + +RUN pip install --extra-index-url \ + https://developer.download.nvidia.com/compute/redist \ + nvidia-dali-tf-plugin-cuda110 + +RUN rm -rf \ + /local/workspace/tappas \ + /opt/google \ + /local/workspace/doc \ + /local/workspace/hailort_examples \ + /usr/share \ + /usr/bin/docker* \ + /usr/bin/containerd* \ + /local/workspace/hailo_virtualenv/lib/python3.8/site-packages/hailo_tutorials + +RUN pip install pip-autoremove +RUN pip-autoremove -y torch jupyter plotly matplotlib \ + ipython tensorboard pip-autoremove + +RUN pip install psutil +RUN pip cache purge +RUN rm -rf ~/.cache