tloen / alpaca-lora

Instruct-tune LLaMA on consumer hardware
Apache License 2.0
18.58k stars 2.21k forks source link

builder docker image fails on Mac m2 #481

Open mhenrichsen opened 1 year ago

mhenrichsen commented 1 year ago

Stacktrace below.

`#0 40.27 × Building wheel for psutil (pyproject.toml) did not run successfully.

0 40.27 │ exit code: 1

0 40.27 ╰─> [47 lines of output]

0 40.27 running bdist_wheel

0 40.27 running build

0 40.27 running build_py

0 40.27 creating build

0 40.27 creating build/lib.linux-aarch64-cpython-310

0 40.27 creating build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_compat.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_psaix.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_pslinux.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_psposix.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_pswindows.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_psosx.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_pssunos.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_psbsd.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/_common.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 copying psutil/init.py -> build/lib.linux-aarch64-cpython-310/psutil

0 40.27 creating build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_testutils.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_misc.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_bsd.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_contracts.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_system.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/runner.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_windows.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_connections.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/main.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_memleaks.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_linux.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_posix.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_osx.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_sunos.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_process.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_unicode.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/test_aix.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 copying psutil/tests/init.py -> build/lib.linux-aarch64-cpython-310/psutil/tests

0 40.27 running build_ext

0 40.27 building 'psutil._psutil_linux' extension

0 40.27 creating build/temp.linux-aarch64-cpython-310

0 40.27 creating build/temp.linux-aarch64-cpython-310/psutil

0 40.27 aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=595 -DPy_LIMITED_API=0x03060000 -DPSUTIL_LINUX=1 -I/usr/include/python3.10 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-310/psutil/_psutil_common.o

0 40.27 psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory

0 40.27 9 | #include

0 40.27 | ^~~~~~

0 40.27 compilation terminated.

0 40.27 psutil could not be installed from sources. Perhaps Python header files are not installed. Try running:

0 40.27 sudo apt-get install gcc python3-dev

0 40.27 error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1

0 40.27 [end of output]

0 40.27

0 40.27 note: This error originates from a subprocess, and is likely not a problem with pip.

0 40.27 ERROR: Failed building wheel for psutil

0 40.27 Successfully built fire peft ffmpy

0 40.27 Failed to build psutil

0 40.27 ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects


Dockerfile:14

13 | COPY requirements.txt requirements.txt 14 | >>> RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \ 15 | >>> && python3.10 -m pip install -r requirements.txt \ 16 | >>> && python3.10 -m pip install numpy --pre torch --force-reinstall --index-url https://download.pytorch.org/whl/nightly/cu118 17 | COPY . .

ERROR: failed to solve: process "/bin/sh -c curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 && python3.10 -m pip install -r requirements.txt && python3.10 -m pip install numpy --pre torch --force-reinstall --index-url https://download.pytorch.org/whl/nightly/cu118" did not complete successfully: exit code: 1`

Is it the pytorch image that is no longer in nightly?

EdgBuc commented 1 year ago

Hi, Having same issue, on M1.

greenido commented 1 year ago

same here :/ (on M1 pro)

miketrimmel commented 1 year ago

Same here