Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing dlc-live on nvidia jetson #69

Closed
Alexander-H9 opened this issue Apr 26, 2022 · 8 comments
Closed

Installing dlc-live on nvidia jetson #69

Alexander-H9 opened this issue Apr 26, 2022 · 8 comments

Comments

@Alexander-H9
Copy link

Install dlc-live on the Jetson Nano within Docker

The Dockerfile is as followed (used SDK and JetPack in the links):

#Instructions: https://github.com/DeepLabCut/DeepLabCut-live/blob/master/docs/install_jetson.md
#Installed SDK: https://developer.nvidia.com/jetpack-sdk-441-archive
#Installed jetpack: https://docs.nvidia.com/jetson/jetpack/install-jetpack/index.html#package-management-tool

#TensorFlow 1.15 Container for JetPack 4.4.1 https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-tensorflow
FROM nvcr.io/nvidia/l4t-tensorflow:r32.4.4-tf1.15-py3

RUN apt-get update -y && apt-get upgrade -y

RUN apt-get install -y
libhdf5-serial-dev
hdf5-tools
libhdf5-dev
zlib1g-dev
zip
libjpeg8-dev
liblapack-dev
libblas-dev
gfortran
python3-pip
python3-venv
python3-tk
curl

RUN pip3 install -U pip testresources setuptools

#Skip pip dependencies (for TensorFlow), because already in the container

#Skip TenorFlow Installation, because already in the container
#RUN pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 'tensorflow<2'

RUN pip3 install deeplabcut-live

CMD ["dlc-live-test"]
#End of the file

I also tried to install it with a virtual enviroment but the error is the same. After a long time of Building wheel and Getting requirements to build wheel the build process ends, but pip3 shows deeplabcut-live installed as version 0.0 and executing the dlc-live -test results in:
Traceback (most recent call last): File "/usr/local/bin/dlc-live-test", line 5, in <module> from check_install.check_install import main ModuleNotFoundError: No module named 'check_install'

Full docker output is in log.txt
Any help is appreciated

@sneakers-the-rat
Copy link
Collaborator

yeah those instructions are now badly out of date. don't quite understand how you're ending up with v0.0, but from the output i see that you're missing tables and there is some guessing that pip does at versions. def looks like a dependency specification problem to me, and it doesn't look like v1.0.2 got released here or pushed to PyPI (other maintainers, you can do that with poetrty build && poetry publish, but i dont' have access myself), which has some fixes for dep management.

it also looks like you're on python 3.6 which is EOL, is that still what's being distributed for the Jetson?

@Alexander-H9
Copy link
Author

Yes they still distribute python 3.6.9 in all their containers and SDKs.

@sneakers-the-rat
Copy link
Collaborator

oof. would recommend checking out pyenv, as supporting 3.6 is now sorta tricky as many packages have phased it out. I would try using that to install python 3.9 (it's a bit easier than trying to compile it yourself), or else try deadsnakes to install it using apt, but that can get tricky with multiple versions of system-level python without a wrapper like pyenv. They made the install a little easier recently with their installer project, so that should be something like

curl https://pyenv.run | bash
exec $SHELL

then that and then installing from this repository rather than PyPI until the maintainers with PyPI access can get the latest version up

git clone https://github.com/DeepLabCut/DeepLabCut-live
pip install ./DeepLabCut-live

@Alexander-H9
Copy link
Author

Thank you for the help. I got it working with installing all dependencies from dlc-live manually and then run pip3 install --no-deps deeplabcut-live.

@SteveGaukrodger
Copy link

@Alexander-H9

Can you provide any more detail on how you managed this? I'm trying to do the same and struggling.

@Alexander-H9
Copy link
Author

@SteveGaukrodger

The final solution was on Jetson AGX with JetPack 4.5.1 and Linux for Tegra r32.6.1 (Ubuntu 18.04), Python 3.6.9 and Tensorflow 2.5.
For the Jetson Nano you might need an older version of Tensorflow and also adjust the dependencies for it.
dockerfile.txt

I hope that helps, otherwise taking a look at your error message could help.

@SteveGaukrodger
Copy link

Awesome. Thanks very much!

@sneakers-the-rat
Copy link
Collaborator

adding to list of things to add to docs when i get a second, thanks @Alexander-H9

@sneakers-the-rat sneakers-the-rat mentioned this issue Jul 23, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants