docker compose 실행 시 pandas 설치 에러 발생
컴파일러가 없어서 생기는 문제 같음
122.3 ChefBuildError
122.3
122.3 Backend subprocess exited when trying to invoke build_wheel
122.3
122.3 + meson setup /tmp/tmplr1w14bl/pandas-2.1.4 /tmp/tmplr1w14bl/pandas-2.1.4/.mesonpy-dhp13mo6/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/tmp/tmplr1w14bl/pandas-2.1.4/.mesonpy-dhp13mo6/build/meson-python-native-file.ini
122.3 The Meson build system
122.3 Version: 1.2.1
122.3 Source dir: /tmp/tmplr1w14bl/pandas-2.1.4
122.3 Build dir: /tmp/tmplr1w14bl/pandas-2.1.4/.mesonpy-dhp13mo6/build
122.3 Build type: native build
122.3 Project name: pandas
122.3 Project version: 2.1.4
122.3 C compiler for the host machine: cc (gcc 13.2.1 "cc (Alpine 13.2.1_git20231014) 13.2.1 20231014")
122.3 C linker for the host machine: cc ld.bfd 2.41
122.3
122.3 ../../meson.build:2:0: ERROR: Unknown compiler(s): [['c++'], ['g++'], ['clang++'], ['nvc++'], ['pgc++'], ['icpc'], ['icpx']]
122.3 The following exception(s) were encountered:
122.3 Running `c++ --version` gave "[Errno 2] No such file or directory: 'c++'"
122.3 Running `g++ --version` gave "[Errno 2] No such file or directory: 'g++'"
122.3 Running `clang++ --version` gave "[Errno 2] No such file or directory: 'clang++'"
122.3 Running `nvc++ --version` gave "[Errno 2] No such file or directory: 'nvc++'"
122.3 Running `pgc++ --version` gave "[Errno 2] No such file or directory: 'pgc++'"
122.3 Running `icpc --version` gave "[Errno 2] No such file or directory: 'icpc'"
122.3 Running `icpx --version` gave "[Errno 2] No such file or directory: 'icpx'"
122.3
122.3 A full log can be found at /tmp/tmplr1w14bl/pandas-2.1.4/.mesonpy-dhp13mo6/build/meson-logs/meson-log.txt
122.3
122.3
122.3 at /usr/local/lib/python3.9/site-packages/poetry/installation/chef.py:147 in _prepare
122.3 143│
122.3 144│ error = ChefBuildError("\n\n".join(message_parts))
122.3 145│
122.3 146│ if error is not None:
122.3 → 147│ raise error from None
122.3 148│
122.3 149│ return path
122.3 150│
122.3 151│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
122.3
122.3 Note: This error originates from the build backend, and is likely not a problem with poetry but with pandas (2.1.4) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "pandas (==2.1.4)"'.
122.3
------
failed to solve: process "/bin/sh -c poetry install" did not complete successfully: exit code: 1
RUN apk update \
&& apk add libevdev-dev -> 안됨
build-essential -y
dockerfile에서 FROM python:3.9-alpine 이미지를 사용하는데 glibc가 아닌 musl libc를 사용하기 때문에 c라이브러리 의존성 이슈가 있음
FROM python:3.9-alpine -> FROM python:3.9 또는 FROM python:3.9-slim 수정
FROM python:3.9 as python-base
RUN apt-get update \
&& apt-get install gdal-bin libgdal-dev -y
FROM python-base as poetry-base
WORKDIR /project
COPY pyproject.toml pyproject.toml
RUN pip install poetry
RUN poetry export --without-hashes -f requirements.txt --output requirements.txt
FROM python-base as app
WORKDIR /project
COPY --from=poetry-base /project/requirements.txt .
RUN pip install -r /project/requirements.txt
COPY . /project