도커 이미지를 만드는 데 다음과 같은 오류가 뜬다.:
Tons of lines of errors. But the below is a parts of them:
79.55 [pipenv.exceptions.InstallError]: [end of output]
79.55 [pipenv.exceptions.InstallError]:
79.55 [pipenv.exceptions.InstallError]: note: This error originates from a subprocess, and is likely not a problem with pip.
79.55 [pipenv.exceptions.InstallError]: ERROR: Failed building wheel for dlib
79.55 [pipenv.exceptions.InstallError]: ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
79.55 ERROR: Couldn't install package: {}
79.55 Package installation failed...
79.56 /usr/local/lib/python3.7/subprocess.py:883: ResourceWarning: subprocess 50 is still running
79.56 ResourceWarning, source=self)
79.56 ResourceWarning: Enable tracemalloc to get the object allocation traceback
79.56 sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='utf-8'>
79.56 ResourceWarning: Enable tracemalloc to get the object allocation traceback
79.56 sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=7 encoding='utf-8'>
79.56 ResourceWarning: Enable tracemalloc to get the object allocation traceback
------
failed to solve: process "/bin/sh -c cd /app/Backend && pipenv install --deploy" did no
오류 메시지에 dlib이 있는 걸 보니 dlib이 실행되기 위해서 도커 이미지 빌드 시에 반드시 설치해야 할 패키지가 있는 듯 싶다.
하단의 코드를 Dockerfile에 추가한다.
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
libopenblas-dev \
liblapack-dev \
libx11-dev \
libgtk-3-dev \
python3-dev \
python3-pip \
python3-numpy \
&& rm -rf /var/lib/apt/lists/*