Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Can't run: segmentation fault

Open tsouza opened this issue 2 years ago • 4 comments

I cloned the repo and ran:

docker compose up --build

But got:

 => ERROR [oasst-backend  3/11] RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt    0.2s
------
 > [oasst-backend  3/11] RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt:
#0 0.159 Segmentation fault
------
failed to solve: executor failed running [/bin/sh -c pip install --no-cache-dir --upgrade -r /app/requirements.txt]: exit code: 139

I am on M1 Pro Ventura 13.1 with docker version 20.10.22

tsouza avatar Feb 07 '23 00:02 tsouza

This looks like an issue with the backend python pckages

fozziethebeat avatar Feb 07 '23 05:02 fozziethebeat

I'd guess this is due to the Docker containers on M1 Macs, and python itself being broken.

What happens if you do this:

docker run -it tiangolo/uvicorn-gunicorn-fastapi:python3.10 bash

Then use pip to install anything, for example pip install pyfiglet

bitplane avatar Feb 22 '23 17:02 bitplane

What happens if you do this:

docker run -it tiangolo/uvicorn-gunicorn-fastapi:python3.10 bash

Then use pip to install anything, for example pip install pyfiglet

❯ docker run -it tiangolo/uvicorn-gunicorn-fastapi:python3.10 bash


Unable to find image 'tiangolo/uvicorn-gunicorn-fastapi:python3.10' locally
python3.10: Pulling from tiangolo/uvicorn-gunicorn-fastapi
1e4aec178e08: Pull complete 
6c1024729fee: Pull complete 
c3aa11fbc85a: Pull complete 
aa54add66b3a: Pull complete 
9e3a60c2bce7: Pull complete 
3b2123ce9d0d: Pull complete 
663f76eb1ef6: Pull complete 
13593c418669: Pull complete 
0b33fd811e1d: Pull complete 
71ec1ddac853: Pull complete 
da722aeb3e09: Pull complete 
a055e0a4bb6f: Pull complete 
3232c189e725: Pull complete 
f02e0f8b2e1d: Pull complete 
91859a6cc4d2: Pull complete 
a740dcf741c5: Pull complete 
9cc4dcba57ed: Pull complete 
150a3113679d: Pull complete 
a16c27473bfc: Pull complete 
cb07ed6cac2d: Pull complete 
Digest: sha256:07c72c939fc0385bfc8e52e7b6b19f3a22a71385142aa5ba9de91d2c78173fec
Status: Downloaded newer image for tiangolo/uvicorn-gunicorn-fastapi:python3.10
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@12fcdf43e13a:/app# pip install pyfiglet
Collecting pyfiglet
  Downloading pyfiglet-0.8.post1-py2.py3-none-any.whl (865 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 865.8/865.8 kB 3.6 MB/s eta 0:00:00
Installing collected packages: pyfiglet
Successfully installed pyfiglet-0.8.post1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: pip install --upgrade pip
root@12fcdf43e13a:/app#

tsouza avatar Feb 23 '23 01:02 tsouza

Cool okay so I guess it must be one of the requirements we're using. Can you try installing the requirements one at a time?

Same thing as before, first add the list from the requirements file into a variable, like by pasting this into the bash shell:

deps = 'aiohttp==3.8.3
alembic==1.8.1
cryptography==39.0.0
fastapi==0.88.0
fastapi-limiter==0.1.5
fastapi-utils==0.2.1
loguru==0.6.0
numpy==1.22.4
prometheus-fastapi-instrumentator==5.9.1
psycopg2-binary==2.9.5
pydantic==1.10.4
pydantic[email]==1.10.4
python-dotenv==0.21.0
python-jose[cryptography]==3.3.0
redis
scipy==1.8.1
SQLAlchemy==1.4.41
sqlmodel==0.0.8
uvicorn==0.20.0'

Then install them, see which one crashes:

pip install --upgrade $deps

If that doesn't give useful info, try them one at a time so all the good ones install:

for dep in $deps; do
    echo $dep;
    pip install --upgrade $dep;    
done

Then run this to find the ones that actually failed:

python -c "wanted=set('''$deps'''.split()); installed=set('''$(pip freeze)'''.split()); print(wanted - installed)"

bitplane avatar Feb 26 '23 05:02 bitplane