Open n-sviridenko opened 3 weeks ago
May be relevant https://github.com/microsoft/OmniParser/issues/33
Yes, #33 didn't solve the Numpy issue. It runs on Python 3.11, but still during Runtime it throws this RuntimeError: Numpy is not available
.
So #25 is still unsolved.
See https://github.com/microsoft/OmniParser/pull/52 for a working Dockerfile:
sudo nvidia-docker build -t omniparser .
sudo docker run -d -p 7861:7861 --gpus all --name omniparser-container omniparser
@abrichr can I do this w/o CUDA?
I believe in the current state, CUDA is a requirement. (@yadong-lu can you please clarify?)
However https://github.com/microsoft/OmniParser/pull/52 includes a deploy.py
file that will automate deployment to EC2 on AWS for you. All you need is:
AWS_ACCESS_KEY_ID=<your aws access key id>
AWS_SECRET_ACCESS_KEY=<your aws secret access key (required)>
AWS_REGION=<your aws region (required)>
GITHUB_OWNER=<your github owner (required)> # e.g. n-sviridenko
GITHUB_REPO=<your github repo (required)> # e.g. OmniParse
GITHUB_TOKEN=<your github token (required)>
It costs about $10/day on g4dn.xlarge with 100GB (the default).
Then all you need is:
# on your local machine, no CUDA required:
python3 -m venv venv && source venv/bin/activate && pip install -r deploy_requirements.txt
python deploy.py start
python client.py "http://<server_ip>:7861"
python deploy.py [pause | stop]
I believe in the current state, CUDA is a requirement. (@yadong-lu can you please clarify?)
However #52 includes a
deploy.py
file that will automate deployment to EC2 on AWS for you. All you need is:AWS_ACCESS_KEY_ID=<your aws access key id> AWS_SECRET_ACCESS_KEY=<your aws secret access key (required)> AWS_REGION=<your aws region (required)> GITHUB_OWNER=<your github owner (required)> # e.g. n-sviridenko GITHUB_REPO=<your github repo (required)> # e.g. OmniParse GITHUB_TOKEN=<your github token (required)>
It costs about $10/day on g4dn.xlarge with 100GB (the default).
Then all you need is:
# on your local machine, no CUDA required: python3 -m venv venv && source venv/bin/activate && pip install -r deploy_requirements.txt python deploy.py start python client.py "http://<server_ip>:7861" python deploy.py [pause | stop]
I had try cpu before and it works (just slow). Also @n-sviridenko feel free to try out our demo: https://huggingface.co/spaces/microsoft/OmniParser
@n-sviridenko My reading of this is it's less about OmniParser and more that you've not been able to install a working version of numpy under Python 3.12
Given your error messages, I suspect this is due to distutils having been deprecated in Python and finally removed in 3.12 - which may explain why those using 3.11 don't experience this.
It's worth googling numpy / distutils and considering options for your particular setup (I suggest you try to go with more recent advice rather than the first thing you find since older distutils issues may have other causes prior to the 3.12 removal)
There's a little background here: https://numpy.org/devdocs/reference/distutils_status_migration.html
Hi,
With python 3.12 it doesn't let installing all deps:
With 3.11 it fails during tensors conversion (probably related to https://github.com/microsoft/OmniParser/issues/25):
How to make this beautiful thing work?