aboutcode-org / scancode.io

ScanCode.io is a server to script and automate software composition analysis pipelines with ScanPipe pipelines. This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ Google Summer of Code, nexB and others generous sponsors!
https://scancodeio.readthedocs.io
Apache License 2.0
106 stars 83 forks source link

Documentation does not mention supporting CPU architecture #866

Open Hritik14 opened 1 year ago

Hritik14 commented 1 year ago

It does mention the amount of memory required as a tooltip (https://scancodeio.readthedocs.io/en/latest/installation.html#run-the-app), but it does not mention the CPU arch ie supporting only amd64 as per dockerfile:

https://github.com/nexB/scancode.io/blob/f84d61207d111187b5c11d54f98cf13362501a0c/Dockerfile#L23C2-L23C2

Hritik14 commented 1 year ago

Also, last time I checked the dev installation was working with arm (Mac m1), is there a reason to restrict the dockerfile to amd64 ?

tdruez commented 1 year ago

Also, last time I checked the dev installation was working with arm (Mac m1), is there a reason to restrict the dockerfile to amd64 ?

Last I checked (a while ago), the Dockerfile was not running properly on arm without forcing the amd64 arch.

Could you provide some context about why forcing this arch is problematic for you?

Hritik14 commented 1 year ago

@tdruez My bad, it's a false positive.


I was getting 501 error on nginx and assumed something is not working on the scancode docker container side following the warning from docker compose

web The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Although, the real problem was some manage.py was command was just taking a while. btw installing rosetta and and enabling it in docker made things a little faster.

pombredanne commented 1 year ago

I would be interested to know if you can run on macOS ARM natively as the toolkit still does not fully support this

tdruez commented 1 year ago

@pombredanne You can run SCIO natively on macOS ARM by installing a dummy (empty) package for those 3 dependencies:

pombredanne commented 1 year ago

I am reopening so we can document this.

tdruez commented 1 year ago

Alternatively, we could publish dummy packages for this arch on pypi for a better installation experience. Not being able to install at all is worst than not having support for a few compression formats.

Hritik14 commented 1 year ago

If it helps someone, I'm currently running scio using rosetta with development installation.

  1. Install intel brew
  2. Install intel python3 using intel brew
  3. Change make dev to make dev PYTHON_EXE=/usr/local/bin/python3
  4. Install psycopg with pip install psycopg[binary]
  5. Enjoy!