Skip to content

Commit

Permalink
Use a virtual env for pip requirements, otherwise we get conflicts now
Browse files Browse the repository at this point in the history
(due to pinning all requirements with pip-tools)
  • Loading branch information
Bjwebb committed Sep 8, 2023
1 parent f6d90a9 commit 625d327
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
COPY requirements_dev.txt /usr/src/app/
COPY entrypoint.sh /usr/src/app/
ENV PATH=$HOME/.cargo/bin:$PATH
ENV VIRTUAL_ENV=/usr/src/venv
ENV PATH=$VIRTUAL_ENV/bin:$HOME/.cargo/bin:$PATH

RUN apk -U upgrade
# Use a virtual env here, because othewise we get conflicats between Alpine's
# packages and pip's. (This has started happening because we switched to pip-
# tools which pins every dependency).
RUN apk add --no-cache gcc musl-dev python3-dev libffi-dev openssl-dev cargo libwebp libwebp-tools &&\
python3 -m venv /usr/src/venv &&\
. /usr/src/venv/bin/activate &&\
pip3 install -r requirements_dev.txt

RUN apk add --no-cache gettext
Expand Down

0 comments on commit 625d327

Please sign in to comment.