Skip to content

Commit 6981fa5

Browse files
committed
fix: venv for python & pip installation
1 parent 2b13162 commit 6981fa5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.devops/intel.Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ COPY --from=build /app/full /app
4949

5050
WORKDIR /app
5151

52+
# PEP 668 are in effect, pip should be run within virtualenv instead
53+
ENV VIRTUAL_ENV=/opt/venv
54+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
5255
RUN apt-get update \
53-
&& apt-get install -y \
54-
git \
55-
python3 \
56-
python3-pip \
56+
&& apt-get install -y python3 python3-pip python3-venv \
57+
&& python3 -m venv $VIRTUAL_ENV \
5758
&& pip install --upgrade pip setuptools wheel \
5859
&& pip install -r requirements.txt \
5960
&& apt autoremove -y \
@@ -62,7 +63,6 @@ RUN apt-get update \
6263
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
6364
&& find /var/cache -type f -delete
6465

65-
6666
ENTRYPOINT ["/app/tools.sh"]
6767

6868
### Light, CLI only
@@ -88,4 +88,3 @@ WORKDIR /app
8888
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
8989

9090
ENTRYPOINT [ "/app/llama-server" ]
91-

0 commit comments

Comments
 (0)