From 6981fa5737319939329254989c157ef477cb8a2c Mon Sep 17 00:00:00 2001 From: Thammachart <1731496+Thammachart@users.noreply.github.com> Date: Thu, 29 May 2025 22:51:51 +0700 Subject: [PATCH 1/2] fix: venv for python & pip installation --- .devops/intel.Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile index 8cad660523ecc..3694e9df99da0 100644 --- a/.devops/intel.Dockerfile +++ b/.devops/intel.Dockerfile @@ -49,11 +49,12 @@ COPY --from=build /app/full /app WORKDIR /app +# PEP 668 are in effect, pip should be run within virtualenv instead +ENV VIRTUAL_ENV=/opt/venv +ENV PATH="$VIRTUAL_ENV/bin:$PATH" RUN apt-get update \ - && apt-get install -y \ - git \ - python3 \ - python3-pip \ + && apt-get install -y python3 python3-pip python3-venv \ + && python3 -m venv $VIRTUAL_ENV \ && pip install --upgrade pip setuptools wheel \ && pip install -r requirements.txt \ && apt autoremove -y \ @@ -62,7 +63,6 @@ RUN apt-get update \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete - ENTRYPOINT ["/app/tools.sh"] ### Light, CLI only @@ -88,4 +88,3 @@ WORKDIR /app HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ] ENTRYPOINT [ "/app/llama-server" ] - From 55504153f3fc847658607618d863a24bf284c070 Mon Sep 17 00:00:00 2001 From: Thammachart <1731496+Thammachart@users.noreply.github.com> Date: Fri, 30 May 2025 00:17:48 +0700 Subject: [PATCH 2/2] fix: install `git` --- .devops/intel.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile index 3694e9df99da0..e3148ddbad519 100644 --- a/.devops/intel.Dockerfile +++ b/.devops/intel.Dockerfile @@ -53,7 +53,7 @@ WORKDIR /app ENV VIRTUAL_ENV=/opt/venv ENV PATH="$VIRTUAL_ENV/bin:$PATH" RUN apt-get update \ - && apt-get install -y python3 python3-pip python3-venv \ + && apt-get install -y git python3 python3-pip python3-venv \ && python3 -m venv $VIRTUAL_ENV \ && pip install --upgrade pip setuptools wheel \ && pip install -r requirements.txt \