lcdb / lcdb-workflows

DEPRECATED. Please see https://github.com/lcdb/lcdb-wf
MIT License
1 stars 0 forks source link

multiqc uid not found in docker tests #11

Open jfear opened 8 years ago

jfear commented 8 years ago

Keep running into docker issues, thought I would ask you first before spending too much time trouble shooting. Basically when I run multiqc I get the following:

I have no name!@6175d9ed7beb:/opt/lcdb$ multiqc 
Traceback (most recent call last):
  File "/opt/conda/bin/multiqc", line 4, in <module>
    __import__('pkg_resources').run_script('multiqc==0.6', 'multiqc')
  File "/opt/conda/lib/python3.5/site-packages/setuptools-20.3-py3.5.egg/pkg_resources/__init__.py", line 726, in run_script
  File "/opt/conda/lib/python3.5/site-packages/setuptools-20.3-py3.5.egg/pkg_resources/__init__.py", line 1484, in run_script
  File "/opt/conda/lib/python3.5/site-packages/multiqc-0.6-py3.5.egg/EGG-INFO/scripts/multiqc", line 33, in <module>
    from multiqc import logger, __version__
  File "/opt/conda/lib/python3.5/site-packages/multiqc-0.6-py3.5.egg/multiqc/__init__.py", line 11, in <module>
    from multiqc.modules.base_module import BaseMultiqcModule
  File "/opt/conda/lib/python3.5/site-packages/multiqc-0.6-py3.5.egg/multiqc/modules/base_module.py", line 12, in <module>
    from multiqc import plots
  File "/opt/conda/lib/python3.5/site-packages/multiqc-0.6-py3.5.egg/multiqc/plots/__init__.py", line 1, in <module>
    from . import bargraph, beeswarm, linegraph, table
  File "/opt/conda/lib/python3.5/site-packages/multiqc-0.6-py3.5.egg/multiqc/plots/bargraph.py", line 15, in <module>
    import matplotlib
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/__init__.py", line 1131, in <module>
    rcParams = rc_params()
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/__init__.py", line 965, in rc_params
    fname = matplotlib_fname()
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/__init__.py", line 794, in matplotlib_fname
    configdir = _get_configdir()
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/__init__.py", line 649, in _get_configdir
    return _get_config_or_cache_dir(_get_xdg_config_dir())
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/__init__.py", line 626, in _get_config_or_cache_dir
    return _create_tmp_config_dir()
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/__init__.py", line 555, in _create_tmp_config_dir
    tempdir = os.path.join(tempdir, 'matplotlib-%s' % getpass.getuser())
  File "/opt/conda/lib/python3.5/getpass.py", line 170, in getuser
    return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 1000'

This seems related to here. I still have issues with #1 but have been running directly as 1000:1000. Maybe I will fire up a linux VM next week and see if I can narrow it down to an OSX problem.

Anyways if you have not run into this before, I can trouble shoot. But, thought you may have seen this kind of thing before.

jfear commented 8 years ago

Poking around a bit. If instead of using -u 1000:1000 I use 1:1 the lookup of the daemon user goes well and multiqc will run. However, I loose permissions to /opt/lcdb (ie #1).

jfear commented 8 years ago

Ok, if I completely remove the -u option everything seems to work. I know that I am running as root when I don't add the -u, is there any disadvantage to running as root? /opt/lcdb is still mounted as your user name 1000:staff.

daler commented 8 years ago

Disadvantage of running as root is having to clean up all the created files later as root. Just an inconvenience really.

daler commented 8 years ago

Do you think allowing /opt/lcdb to be world-writeable in the dockerfile would solve the issue?

daler commented 8 years ago

A similar problem here, solved with a clever method: http://stackoverflow.com/a/26547845

Kind of strange this problem doesn't pop up more. I'm thinking for local runs and testing we should use conda envs rather than docker. As long as the docker container uses the same conda env it should have the same results.