peterlee0127 / tensorflow-nvJetson

TensorFlow for NVIDIA Jetson, also include patch and script for building.
https://tfjetson.peterlee.app
205 stars 61 forks source link

Bad merge/concat split whl files on TX2 #15

Closed asinha94 closed 6 years ago

asinha94 commented 6 years ago

I tried to merge the whl files using the command cat tensorflow-1.7.0-cp27-cp27mu-linux_aarch64.whl.part-* > tensorflow-1.7.0-cp27-cp27mu-linux_aarch64.whl but I get the following error when I try to install using PIP:

Processing ./tensorflow-1.7.0-cp27-cp27mu-linux_aarch64.whl
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 577, in _prepare_file
    session=self.session, hashes=hashes)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 798, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 705, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 617, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 502, in unzip_file
    zip = zipfile.ZipFile(zipfp, allowZip64=True)
  File "/usr/lib/python2.7/zipfile.py", line 770, in __init__
    self._RealGetContents()
  File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file

I get the same error when using 1.8. Do you have a pre-merged file anywhere?

peterlee0127 commented 6 years ago

I don't know why cause this issue. Do you use Jetpack 3.2 ?

Please try this script agin.

Install by curl

sh -c "$(curl -fsSL https://tfjetson.peterlee0127.com/installTF.sh)"

or

Install by wget

sh -c "$(wget https://tfjetson.peterlee0127.com/installTF.sh -O -)"
asinha94 commented 6 years ago

Thanks! that fixed it. Yes I used Jetpack 3.2. I tried with multiple versions but they all had the same issue, not sure why.

asinha94 commented 6 years ago

Probably best to ask in the nvidia forums or as another issue, but any idea why I would be getting a Out of Memory GPU exception when running some of the sample object detection API tutorials? On my desktop (w/ NVIDIA 1060 6GB) the whole process doesn't exceed 3 GB but on the TX2 I seem to use up 6GB+

peterlee0127 commented 6 years ago

OOM issue you may try this

config = tf.ConfigProto() config.gpu_options.allow_growth = True

session = tf.Session(config=config, ...)