mjuric / conda-lsst

Building Conda packages for the LSST stack
4 stars 8 forks source link

docker make fails on OSX 10.10.5 #75

Open danielsf opened 7 years ago

danielsf commented 7 years ago

I am trying to run docker/make on my Mac laptop running Yosemity (OSX 10.10.5). The Dockerfile fails on step 10

RUN groupadd -g $GROUP_ID $GROUP_NAME

This is because my user is a part of the group "staff" with group_id=20. Unfortunately, group_id=20 corresponds to the "games" group that comes with the Linux docker container, so running group add results in a "GID not unique" error.

danielsf commented 7 years ago

After I hack the Dockerfile to use an unassigned group_id, it fails on step 11 with

Step 11 : RUN useradd -d $HOME -g $GROUP_NAME -u $USER_ID $USER_NAME
 ---> Running in 002cbfc08e4b
useradd: cannot create directory /Users/danielsf
The command '/bin/sh -c useradd -d $HOME -g $GROUP_NAME -u $USER_ID $USER_NAME' returned a non-zero code: 12
make: *** [image] Error 12
danielsf commented 7 years ago

/Users/danielsf is my home directory on my laptop.

danielsf commented 7 years ago

I was able to fix the "cannot make the directory" error by adding

RUN     mkdir -p $HOME

before step 11.

danielsf commented 7 years ago

Even after getting docker/make to run, actually building an LSST product fails with traceback

  eups (ver 2.0.2-0)   [from static recipe] ... ERROR
Last 20 lines from the log file:
========================================================================
    sys.exit(conda_build.cli.main_build.main())
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 239, in main
    execute(sys.argv[1:])
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 231, in execute
    already_built=None, config=config)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/api.py", line 83, in build
    need_source_download=need_source_download, config=config)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 998, in build_tree
    config=recipe_config)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 714, in build
    prefix=config.build_prefix)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/build.py", line 357, in create_info_files
    source.git_info(config, fo)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/site-packages/conda_build/source.py", line 262, in git_info
    p = Popen(cmd.split(), stdout=PIPE, stderr=PIPE, cwd=get_dir(config), env=env)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
========================================================================
The complete build log is in /astro/users/danielsf/conda-lsst/recipes/eups/_build.log
Traceback (most recent call last):
  File "/astro/users/danielsf/conda-lsst/bin/conda-lsst", line 149, in <module>
    args.func(config, args)
  File "/astro/users/danielsf/conda-lsst/bin/conda-lsst", line 30, in main_make_recipes
    subprocess.check_call('bash %s/rebuild.sh' % (config.output_dir), shell=True)
  File "/astro/users/danielsf/conda-lsst/miniconda/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bash /astro/users/danielsf/conda-lsst/recipes/rebuild.sh' returned non-zero exit status 255

This happens on both OSX and Linux