From e78723330ec9ee68b81b904ce1249cab3aed4598 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Wed, 11 Sep 2024 11:51:19 +0200 Subject: [PATCH] Fixing the builds ? --- .github/workflows/tests.yaml | 4 +++- Dockerfile | 4 ++++ Dockerfile_amd | 2 ++ Dockerfile_intel | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6faabe3b..e92ecbe8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,7 +29,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: 3.11 - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -81,6 +81,8 @@ jobs: pre-commit run --all-files - name: Run Rust tests run: | + export LD_LIBRARY_PATH=${{ pythonLocation }}/lib/ + echo $LD_LIBRARY_PATH cargo test - name: sccache stats run: | diff --git a/Dockerfile b/Dockerfile index 0d0e89b1..2851f828 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,13 @@ COPY benchmark benchmark COPY router router COPY backends backends COPY launcher launcher + RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-dev RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP && \ unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \ @@ -37,6 +40,7 @@ COPY router router COPY backends backends COPY launcher launcher RUN cargo build --profile release-opt +RUN cargo build --profile release-opt # Python builder # Adapted from: https://github.com/pytorch/pytorch/blob/master/Dockerfile diff --git a/Dockerfile_amd b/Dockerfile_amd index 8cb699dd..9174051e 100644 --- a/Dockerfile_amd +++ b/Dockerfile_amd @@ -17,6 +17,8 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-dev RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP && \ unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \ diff --git a/Dockerfile_intel b/Dockerfile_intel index 0cda4d4b..c41a483e 100644 --- a/Dockerfile_intel +++ b/Dockerfile_intel @@ -18,6 +18,8 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-dev RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP && \ unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \