diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index bce97a07e..5e15cb6a7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,7 +3,7 @@ name: On pull request on: pull_request: paths-ignore: - - 'docs/**' + - "docs/**" env: DEFAULT_PYTHON: 3.9 @@ -73,8 +73,8 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: Install requirements run: | - python3 -m pip install -U pip - python3 -m pip install -r docker/main/requirements-dev.txt + curl -LsSf https://astral.sh/uv/install.sh | sh + uv pip install --system -r docker/main/requirements-dev.txt - name: Check formatting run: | ruff format --check --diff frigate migrations docker *.py diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile index 9d2f442f0..e7c786599 100644 --- a/docker/main/Dockerfile +++ b/docker/main/Dockerfile @@ -62,12 +62,11 @@ FROM base_host AS ov-converter ARG DEBIAN_FRONTEND # Install OpenVino Runtime and Dev library +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ COPY docker/main/requirements-ov.txt /requirements-ov.txt RUN apt-get -qq update \ && apt-get -qq install -y wget python3 python3-dev python3-distutils gcc pkg-config libhdf5-dev \ - && wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \ - && python3 get-pip.py "pip" \ - && pip install -r /requirements-ov.txt + && uv pip install --system -r /requirements-ov.txt # Get OpenVino Model RUN --mount=type=bind,source=docker/main/build_ov_model.py,target=/build_ov_model.py \ @@ -218,12 +217,12 @@ ENV PATH="/usr/local/go2rtc/bin:/usr/local/tempio/bin:/usr/local/nginx/sbin:${PA ENV LIBAVFORMAT_VERSION_MAJOR=60 # Install dependencies +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ RUN --mount=type=bind,source=docker/main/install_deps.sh,target=/deps/install_deps.sh \ /deps/install_deps.sh RUN --mount=type=bind,from=wheels,source=/wheels,target=/deps/wheels \ - python3 -m pip install --upgrade pip && \ - pip3 install -U /deps/wheels/*.whl + uv pip install --system -U /deps/wheels/*.whl COPY --from=deps-rootfs / / diff --git a/docker/rocm/Dockerfile b/docker/rocm/Dockerfile index eebe04878..ab0fe3d0e 100644 --- a/docker/rocm/Dockerfile +++ b/docker/rocm/Dockerfile @@ -70,10 +70,10 @@ RUN apt-get -y install libnuma1 WORKDIR /opt/frigate/ COPY --from=rootfs / / +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ COPY docker/rocm/requirements-wheels-rocm.txt /requirements.txt -RUN python3 -m pip install --upgrade pip \ - && pip3 uninstall -y onnxruntime-openvino \ - && pip3 install -r /requirements.txt +RUN uv pip uninstall --system -y onnxruntime-openvino \ + && uv pip install --system -r /requirements.txt ####################################################################### FROM scratch AS rocm-dist