Skip to content

Commit

Permalink
linux: fix multi python install
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jun 8, 2023
1 parent 82d1c3a commit 069f765
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions install/docker/Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ RUN apt-get -y install \
# python pip
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED

RUN for v in 3 3.9; \
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro

RUN bash -c "for v in 3 3.9; \
do \
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro
python$v -m pip install --upgrade pip && \
python$v -m pip install --force-reinstall --no-binary :all: cffi && \
python$v -m pip install debugpy typing_extensions psutil; \
done
done"

################################################################
# End section generated from template/Dockerfile.full.header
Expand All @@ -99,15 +100,15 @@ RUN for v in 3 3.9; \
FROM header as base

# intel opencl gpu for openvino
RUN if [ "$(uname -m)" = "x86_64" ]; \
RUN bash -c "if [ \"$(uname -m)\" == \"x86_64\" ]; \
then \
apt-get update && apt-get install -y gpg-agent && \
rm -f /usr/share/keyrings/intel-graphics.gpg && \
wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \
apt-get -y install \
intel-opencl-icd; \
fi
fi"

ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
ENV SCRYPTED_CAN_RESTART="true"
Expand Down
4 changes: 2 additions & 2 deletions install/docker/template/Dockerfile.full.footer
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
FROM header as base

# intel opencl gpu for openvino
RUN if [ "$(uname -m)" = "x86_64" ]; \
RUN bash -c "if [ \"$(uname -m)\" == \"x86_64\" ]; \
then \
apt-get update && apt-get install -y gpg-agent && \
rm -f /usr/share/keyrings/intel-graphics.gpg && \
wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list && \
apt-get -y install \
intel-opencl-icd; \
fi
fi"

ENV SCRYPTED_INSTALL_ENVIRONMENT="docker"
ENV SCRYPTED_CAN_RESTART="true"
Expand Down
9 changes: 5 additions & 4 deletions install/docker/template/Dockerfile.full.header
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ RUN apt-get -y install \
# python pip
RUN rm -f /usr/lib/python**/EXTERNALLY-MANAGED

RUN for v in 3 3.9; \
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro

RUN bash -c "for v in 3 3.9; \
do \
# pyvips is broken on x86 due to mismatch ffi
# https://stackoverflow.com/questions/62658237/it-seems-that-the-version-of-the-libffi-library-seen-at-runtime-is-different-fro
python$v -m pip install --upgrade pip && \
python$v -m pip install --force-reinstall --no-binary :all: cffi && \
python$v -m pip install debugpy typing_extensions psutil; \
done
done"

################################################################
# End section generated from template/Dockerfile.full.header
Expand Down

0 comments on commit 069f765

Please sign in to comment.