From 70926e5b72c231998975b6943a3f3d5d9e341890 Mon Sep 17 00:00:00 2001 From: Bert Kleewein Date: Fri, 21 Jul 2023 12:02:57 -0700 Subject: [PATCH 1/2] fix pip install failure --- docker_images/c/Dockerfile | 5 ----- docker_images/node/Dockerfile.node16 | 5 ----- docker_images/node/Dockerfile.node18 | 5 ----- 3 files changed, 15 deletions(-) diff --git a/docker_images/c/Dockerfile b/docker_images/c/Dockerfile index c1eb7b4c..5058299d 100644 --- a/docker_images/c/Dockerfile +++ b/docker_images/c/Dockerfile @@ -48,16 +48,11 @@ RUN git clone https://github.com/Corvusoft/restbed . \ && rm -r dependency/asio/asio/src/tests \ && rm -r dependency/asio/asio/src/examples -RUN pip install --upgrade pip - WORKDIR /system_control_app COPY ./system_control_app . RUN pip install -r requirements.txt EXPOSE 8040 -# force container rebuild when switching from master to main -RUN echo "switch to main" > /horton_tag.txt - ARG HORTON_REPO WORKDIR /sdk RUN git clone https://github.com/$HORTON_REPO . diff --git a/docker_images/node/Dockerfile.node16 b/docker_images/node/Dockerfile.node16 index b899e009..50937435 100644 --- a/docker_images/node/Dockerfile.node16 +++ b/docker_images/node/Dockerfile.node16 @@ -13,8 +13,6 @@ RUN update-alternatives --install /usr/bin/python python $(which python3) 50 \ RUN npm install lerna -g -RUN pip install --upgrade pip - RUN git config --global user.email "you@example.com" \ && git config --global user.name "Your Name" \ && git config --global core.autocrlf true @@ -27,9 +25,6 @@ WORKDIR /system_control_app COPY ./system_control_app . RUN pip install -r requirements.txt -# force container rebuild when switching from master to main -RUN echo "switch to main" > /horton_tag.txt - # phase 1: grab the base branch and run prebuild ARG HORTON_REPO WORKDIR /src/sdk diff --git a/docker_images/node/Dockerfile.node18 b/docker_images/node/Dockerfile.node18 index 4a42e9d6..a1b5de07 100644 --- a/docker_images/node/Dockerfile.node18 +++ b/docker_images/node/Dockerfile.node18 @@ -13,8 +13,6 @@ RUN update-alternatives --install /usr/bin/python python $(which python3) 50 \ RUN npm install lerna -g -RUN pip install --upgrade pip - RUN git config --global user.email "you@example.com" \ && git config --global user.name "Your Name" \ && git config --global core.autocrlf true @@ -27,9 +25,6 @@ WORKDIR /system_control_app COPY ./system_control_app . RUN pip install -r requirements.txt -# force container rebuild when switching from master to main -RUN echo "switch to main" > /horton_tag.txt - # phase 1: grab the base branch and run prebuild ARG HORTON_REPO WORKDIR /src/sdk From eda2ec039e087ce9817dc58bc5522ce9ceed248d Mon Sep 17 00:00:00 2001 From: Bert Kleewein Date: Fri, 21 Jul 2023 14:17:51 -0700 Subject: [PATCH 2/2] add --break-system-packages flag --- docker_images/node/Dockerfile.node16 | 4 +++- docker_images/node/Dockerfile.node18 | 4 +++- vsts/gate-horton.yaml | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker_images/node/Dockerfile.node16 b/docker_images/node/Dockerfile.node16 index 50937435..5283bf59 100644 --- a/docker_images/node/Dockerfile.node16 +++ b/docker_images/node/Dockerfile.node16 @@ -23,7 +23,9 @@ EXPOSE 8080 WORKDIR /system_control_app COPY ./system_control_app . -RUN pip install -r requirements.txt +# --break-system-packages is necessary because we're installing the system control app into the global package store instead of using pipx or virtualenv +# We're not actually breaking anything. The option name just means that we _could_ break system packages if we weren't careful, but we are being careful. +RUN pip install -r requirements.txt --break-system-packages # phase 1: grab the base branch and run prebuild ARG HORTON_REPO diff --git a/docker_images/node/Dockerfile.node18 b/docker_images/node/Dockerfile.node18 index a1b5de07..3a69b3ab 100644 --- a/docker_images/node/Dockerfile.node18 +++ b/docker_images/node/Dockerfile.node18 @@ -23,7 +23,9 @@ EXPOSE 8080 WORKDIR /system_control_app COPY ./system_control_app . -RUN pip install -r requirements.txt +# --break-system-packages is necessary because we're installing the system control app into the global package store instead of using pipx or virtualenv +# We're not actually breaking anything. The option name just means that we _could_ break system packages if we weren't careful, but we are being careful. +RUN pip install -r requirements.txt --break-system-packages # phase 1: grab the base branch and run prebuild ARG HORTON_REPO diff --git a/vsts/gate-horton.yaml b/vsts/gate-horton.yaml index 074ed73b..a817a18c 100644 --- a/vsts/gate-horton.yaml +++ b/vsts/gate-horton.yaml @@ -8,6 +8,7 @@ jobs: vmImage: 'ubuntu-20.04' strategy: matrix: + node16: { variant: node16 } node18: { variant: node18 } c: { language: c } java: { language: java }