From f07c1ceaa5162e2ad3b127e06b162508dc57e4db Mon Sep 17 00:00:00 2001 From: Allen Date: Thu, 30 Nov 2023 15:06:50 +0800 Subject: [PATCH] [FIX] Fix docker build error (#1831) (#1832) Co-authored-by: Antoni Baum --- Dockerfile | 5 +++++ pyproject.toml | 3 ++- requirements-build.txt | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 requirements-build.txt diff --git a/Dockerfile b/Dockerfile index 6773689f75b2a..7fd8933957334 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,11 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # image to build pytorch extensions FROM dev AS build +# install build dependencies +COPY requirements-build.txt requirements-build.txt +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install -r requirements-build.txt + # copy input files COPY csrc csrc COPY setup.py setup.py diff --git a/pyproject.toml b/pyproject.toml index e3e3e389f7897..045d925cb1131 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,9 @@ [build-system] +# Should be mirrored in requirements-build.txt requires = [ "ninja", "packaging", - "setuptools", + "setuptools >= 49.4.0", "torch >= 2.1.0", "wheel", ] diff --git a/requirements-build.txt b/requirements-build.txt new file mode 100644 index 0000000000000..38514d273f843 --- /dev/null +++ b/requirements-build.txt @@ -0,0 +1,6 @@ +# Should be mirrored in pyproject.toml +ninja +packaging +setuptools>=49.4.0 +torch>=2.1.0 +wheel \ No newline at end of file