Since the l updated to Docker v.4.23 on WIndows 11, I can’t build many of of my previously working Dockerfiles as there is always a Segmentation Fault at some point or another. Concretely, I am using docker primarily as a dev container in Visual Studio,
Here is an example of one of the docker files with problematic build:
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
RUN pip install jupyter
RUN pip install nltk
RUN pip install pandas
# RUN pip install sentencepiece
RUN pip install accelerate
RUN pip install scikit-learn
RUN pip install matplotlib
COPY requirements.txt /opt/app/requirements.txt
WORKDIR /opt/app
RUN pip install -r requirements.txt
When running docker build I get the following error:
> 1.752 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.9/294.9 kB 4.3 MB/s eta 0:00:00
> 1.777 Downloading fsspec-2023.9.1-py3-none-any.whl (173 kB)
> 1.806 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.4/173.4 kB 8.3 MB/s eta 0:00:00
> 2.125 Segmentation fault
> ------
> Dockerfile:10
> --------------------
> 8 | RUN pip install pandas
> 9 | # RUN pip install sentencepiece
> 10 | >>> RUN pip install accelerate
> 11 | RUN pip install scikit-learn
> 12 | RUN pip install matplotlib
> --------------------
> ERROR: failed to solve: process "/bin/sh -c pip install accelerate" did not complete successfully: exit code: 139
Equally, when commenting out other python package I get the same error, but in different places:
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
RUN pip install jupyter
RUN pip install nltk
# RUN pip install pandas
# RUN pip install sentencepiece
# RUN pip install accelerate
# RUN pip install scikit-learn
RUN pip install matplotlib
The error now “moved” apparently to the matplotlib package:
00:00
4.348 Downloading matplotlib-3.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux
2014_x86_64.whl (11.6 MB)
7.152 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 4.2 MB/s eta 0:
00:00
7.164 Segmentation fault
------
Dockerfile-with-features:14
--------------------
12 | # RUN pip install accelerate
13 | # RUN pip install scikit-learn
14 | >>> RUN pip install matplotlib
15 |
16 | COPY requirements.txt /opt/app/requirements.txt
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install matplotlib" did not comp
lete successfully: exit code: 139
Again, I had no issues with these builds previously. The problems started after upgrading to 4.23. I downgraded to the previous version, de- and re-installed docker several times, but to no effect. I don’t think anything else change on my system. Am at a complete loss as what’s going on and would greatly appreciate any help.