tensorflow/tensorflow-gpu:2.6.0 docker image broken? - docker

For some time now I am doing object detection on the GPU using tensorflow.
I have the following problem: I am forced to stick with version 2.3.0 because all versions after 2.3.0 fail with the following error:
Traceback (most recent call last):
File "src/main/python/roldetector/video_rol_detector.py", line 6, in <module>
import tensorflow as tf
File "/home/tensorflow/.local/lib/python3.6/site-packages/tensorflow/__init__.py", line 438, in <module>
_ll.load_library(_main_dir)
File "/home/tensorflow/.local/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 154, in load_library
py_tf.TF_LoadLibrary(lib)
tensorflow.python.framework.errors_impl.NotFoundError: /usr/local/lib/python3.6/dist-packages/tensorflow/core/kernels/libtfkernel_sobol_op.so: undefined symbol: _ZN10tensorflow8OpKernel11TraceStringEPNS_15OpKernelContextEb
I know there are more people having this problem but I have not seen a working solution yet.
The most remarkable - almost contradictory - is that docker is supposed to prevent this
kind of problem. I am working on ubuntu 20.04 but I should not need to specify that because if the docker image is correct then it should not matter what is running on the host for it to work. Right?
Does anyone have a working solution so I can start using the latest version of tensorflow? (All versions after 2.3.0 seem to suffer from the same problem)
Regards,
Chris

Related

Issues installing Drake locally on Ubuntu 18.04

I am following the instructions in the textbook of the course 6.832, appendix A, on how to install Drake locally on Linux.
All the installation steps have completed and seems to be successful. In addition, I have installed all the prerequisites as described. However, when I run the test in section 2.3
(python -c 'import pydrake; print(pydrake.__file__)')
I have experienced several errors.
It seems that it is trying to access older version of several lib***.so files than what I have.
F.eks: Pydrake tried to include libgfortran.so.3, when I only have libgfortran.so.4 on my computer. I tried to do some "hackfixes" by using the ln -s command to make the terminal accept "libgfortran.so.4" as "libgfortran.so.3". But, now I ran into another error that I don't know how to solve.
It says:
Traceback (most recent call last): File "", line 1, in
File
"/opt/drake/lib/python2.7/site-packages/pydrake/init.py", line 32,
in from . import common File
"/opt/drake/lib/python2.7/site-packages/pydrake/common/init.py",
line 3, in from ._module_py import * ImportError:
/opt/drake/lib/python2.7/site-packages/pydrake/common/../../../../libdrake.so:
undefined symbol:
_ZN6google8protobuf2io17CodedOutputStream28WriteVarint32FallbackToArrayEjPh
How do I handle this problem?
If you followed section A.2.1 "download the binaries" verbatim, you would be downloading https://drake-packages.csail.mit.edu/drake/continuous/drake-latest-xenial.tar.gz, the package for Ubuntu 16.04 (Xenial), which links to libgfortran.so.3.
Since you are on Ubuntu 18.04 (Bionic), you would instead need to download https://drake-packages.csail.mit.edu/drake/continuous/drake-latest-bionic.tar.gz, which links to libgfortran.so.4.

How can I reproduce 'Improved GAN' code? Problems with theano/cudnn/docker

I've been trying to reproduce the code found here, with respect to the "Improved GANs" by OpenAI, but I'm having a lot of trouble setting the environment (a Docker container).
I just can't make Theano work properly with this code.
I created a Docker container to test it, but a segmentation fault is raised when I use the stable version of Theano installed using conda...
Some posts suggest to use the development version of Theano instead, but when I update it, Theano can't find the Cudnn anymore
(gpuarray/dnn.py", line 98, in _dnn_lib raise RuntimeError('Could not load cudnn library') RuntimeError: Could not load cudnn library)
If someone have some background with Theano/lasagne/docker could help me I would appreciate it a lot. If requested I could paste my Dockerfile, or anything that could help.
I managed to "fix" it using the following dockerfile.
Hope it can help someone :)
Apparently, it needed an older Theano version for it to work properly.

kuka_grasp_block_playback.py from bulletphysics/bullet3 (pybullet library) not running on my system.

I downloaded the bullet3 github repository (Bullet Physics SDK) from https://github.com/bulletphysics/bullet3.git which contains python bindings for OpenAI Gym examples to run Reinforcement Learning Algorithms.
I tried running the kuka_grasp_block_playback.py example present in the following directory: bullet3-master/examples/pybullet/examples/
My system does not support pybullet.GUI and so I went ahead with pybullet.DIRECT.
But, on running it using python kuka_grasp_block_playback.py, its giving me the following error:
Traceback (most recent call last):
File "kuka_grasp_block_playback.py", line 92, in <module>
stepIndex = int(p.readUserDebugParameter(stepIndexId))
pybullet.error: Failed to read parameter.
How to deal with this ?
This is an out-of-date question, but just in case:. the latest version of pybullet contains a similar KUKA grasping implementation as OpenAI Gym environment. Just run 'sudo pip install pybullet' to get it.
This gym environment can be run without GUI without issue. See the quickstart guide at http://pybullet.org for more info about those pybullet Gym environments for Deep Reinforcement Learning.
The readUserDebugParameter only executes when using GUI mode, it fails in DIRECT mode, so just comment it out.

Python 3.4, django 1.7 oscar configuration

I have installed oscar in django 1.7 on windows 8 and followed the official tutorials but after the installation when i use python django-admin.py startproject demoshop command it gives an error :
(oscar) c:\Python34\Scripts>python django-admin.py startproject demoshop
Traceback (most recent call last):
File "django-admin.py", line 2, in <module>
from django.core import management
ImportError: No module named 'django'
I have also set the environment variables
What am I doing wrong? Appreciate any help.

python-oauth2 on python 3x and windows

I want to setup an oauth library for Python on my windows desktop. I am newbie and this is my second day on Python and I having a tonne of trouble.
I downloaded the python-oauth2 (hudson-python-oauth2-167.zip) from github. I have extracted this to my python32 folder. When I run the setup command "python setup.py", I first got a syntax error on the print statement. I assumed it is because I am running on windows and so I changed it and then ran the setup.
I then got the following error:
Traceback (most recent call last):
File "C:\Python32\simplegeo-python-oauth2-1920657\setup.py", line 2, in
from setuptools import setup, find_packages
ImportError: No module named setuptools
Can someone guide me with setting up python-oauth2? Am I missing something basic here?
You need to install Distribute, which is a fork of setuptools that supports Python 3.
That said, your syntax error was because python-oauth2 doesn't seem to run on Python 3 yet, so you need to either help port it, or use Python 2.7.

Resources