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

Example fails if /bin not on PATH #9

Open
chrisburr opened this issue Sep 24, 2020 · 2 comments
Open

Example fails if /bin not on PATH #9

chrisburr opened this issue Sep 24, 2020 · 2 comments

Comments

@chrisburr
Copy link
Contributor

On Arch Linux the example:

conda docker build -b frolvlad/alpine-glibc:latest -i example-image:123456 -o demo.tar numpy numba flask

fails with the error:

Executing transaction: done
Rolling back transaction: done

Exception('No compatible shell found!')
()

/.../sbin/chroot.fakechroot: line 147: 602419 Segmentation fault      (core dumped) env -u FAKECHROOT_BASE_ORIG FAKECHROOT_CMD_ORIG= LD_LIBRARY_PATH="$fakechroot_chroot_paths" FAKECHROOT_BASE="$fakechroot_chroot_base" "$fakechroot_chroot_chroot" "${@:1:$(($fakechroot_chroot_n - 1))}" "$fakechroot_chroot_final_newroot" "${@:$(($fakechroot_chroot_n + 1))}"
INFO:conda_docker.conda:building conda environment took 20.671 [s]
INFO:conda_docker.conda:adding conda environment in package layers
Traceback (most recent call last):
  File "/.../bin/conda-docker", line 11, in <module>
    load_entry_point('conda-docker', 'console_scripts', 'conda-docker')()
  File "/.../conda_docker/cli.py", line 121, in main
    cli(args)
  File "/.../conda_docker/cli.py", line 26, in cli
    args.func(args)
  File "/.../conda_docker/cli.py", line 114, in handle_conda_build
    layering_strategy=args.layering_strategy,
  File "/.../conda_docker/conda.py", line 635, in build_docker_environment
    layering_strategy=layering_strategy,
  File "/.../conda_docker/conda.py", line 582, in add_conda_layers
    image, hostpath, arcpath=arcpath, filter=filter, records=records
  File "/.../conda_docker/conda.py", line 548, in add_conda_package_layers
    with open(meta_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpi3vqxxt8/opt/conda/conda-meta/_libgcc_mutex-0.1-conda_forge.json'

This is because PATH is being propagated from the host and doesn't include /bin (in this alpine image the shell is /bin/bash). Appending /bin to PATH gets me slightly further (before hitting an unrelated segfault that I'm still debugging).

@chrisburr
Copy link
Contributor Author

Ah the other segfault is "harmless":

# FIXME: this should reall be check_output(), but chroot or fakechroot is
# giving some weird segfault after the install command completes ¯\_(ツ)_/¯

@scopatz
Copy link
Contributor

scopatz commented Oct 5, 2020

@chrisburr - sorry for the late reply. Do you have a proposed fix?

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

2 participants