Skip to content

Commit

Permalink
Ubuntu 22.04: Use python virtualenv
Browse files Browse the repository at this point in the history
Avoid conflicts of python packages between pip and the Fedora system
by using a virtual environment.
The EDK2 dependencies are pre-installed too.

Signed-off-by: Oliver Steffen <[email protected]>
  • Loading branch information
osteffenrh committed May 27, 2024
1 parent 6a2bc8d commit edcb285
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Ubuntu-22/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ ENV TZ=UTC

ENV GCC_MAJOR_VERSION=12

# Preinstall python + dependencies as virtual environment
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
python3 \
virtualenv
RUN virtualenv /opt/venv
ENV VIRTUAL_ENV /opt/venv
ENV PATH /opt/venv/bin:$PATH
RUN pip install --upgrade pip \
-r "https://raw.githubusercontent.com/tianocore/edk2/master/pip-requirements.txt"


# Install and update the package list
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
Expand All @@ -44,9 +56,6 @@ RUN apt-get update && \
virtualenv \
device-tree-compiler \
mono-devel \
python3\
python3-pip \
python3-venv \
locales \
gnupg \
ca-certificates && \
Expand Down

0 comments on commit edcb285

Please sign in to comment.