Skip to content

Commit

Permalink
docker: reduce dependencies for non arm7, pil will have wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Mar 20, 2023
1 parent 8830091 commit 64a0f90
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
17 changes: 11 additions & 6 deletions docker/Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,26 @@ RUN apt-get -y install \
python3-dev \
python3-gi \
python3-gst-1.0 \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-pip \
python3-setuptools \
python3-skimage \
python3-wheel

RUN if [ "$(uname -m)" == "armhf" ]; \
then \
apt-get -y install \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-skimage; \
fi

# python pip
RUN python3 -m pip install --upgrade pip
# 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 pip install --force-reinstall --no-binary :all: cffi
RUN python3 -m pip install aiofiles debugpy typing_extensions typing psutil
RUN python3 -m pip install aiofiles debugpy typing_extensions psutil

################################################################
# End section generated from template/Dockerfile.full.header
Expand Down
17 changes: 11 additions & 6 deletions docker/template/Dockerfile.full.header
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,26 @@ RUN apt-get -y install \
python3-dev \
python3-gi \
python3-gst-1.0 \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-pip \
python3-setuptools \
python3-skimage \
python3-wheel

RUN if [ "$(uname -m)" == "armhf" ]; \
then \
apt-get -y install \
python3-matplotlib \
python3-numpy \
python3-opencv \
python3-pil \
python3-skimage; \
fi

# python pip
RUN python3 -m pip install --upgrade pip
# 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 pip install --force-reinstall --no-binary :all: cffi
RUN python3 -m pip install aiofiles debugpy typing_extensions typing psutil
RUN python3 -m pip install aiofiles debugpy typing_extensions psutil

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

0 comments on commit 64a0f90

Please sign in to comment.