bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
994 stars 354 forks source link

docker path update #775

Closed kern3020 closed 9 years ago

kern3020 commented 9 years ago

Hello,

I ran into a problem debugging in the container.

I have imported a stable image

$ docker import https://s3.amazonaws.com/bcbio/docker/bcbio-stable.gz jkern/bcbio-dev:stable

At this point everything seems clean. Then I clone the git repository in the docker container. When I try to set it up for development...

$  python setup.py develop 

it fails.

Writing /tmp/easy_install-aA6YsY/pythonpy-0.3.7/setup.cfg
Running pythonpy-0.3.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-aA6YsY/pythonpy-0.3.7/egg-dist-tmp-bm9fDS
error: SandboxViolation: os.open('/etc/bash_completion.d/tmpGFhiN7', 131266, 384) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

This breaks down to a path problem. The build picks up an old version...

$ /usr/bin/easy_install --version
setuptools 3.3

This path update fixes the problem

export PATH=/usr/local/share/bcbio-nextgen/anaconda/bin:${PATH}

https://github.com/chapmanb/bcbio-nextgen/blob/master/Dockerfile should be updated accordingly.

-jk

chapmanb commented 9 years ago

John; Sorry about the issues here. It sounds like you're trying to install bcbio-vm inside the docker container -- is that right? If so, it's meant to live strictly outside the container and manage running/managing the containers and AWS. I wouldn't expect building it inside the container to work cleanly. Does that help explain what is happening?

kern3020 commented 9 years ago

It sounds like you're trying to install bcbio-vm inside the docker container -- is that right?

No, this is cwl work. While I studied the bcbio-vm initially, I am not using it at all in this phase of the effort. Here I am working with containers directly.

I ran into this issue while setting up a bcbio-nextgen repository for debugging. If I set the path everything works as expected.

$ export PATH=/usr/local/share/bcbio-nextgen/anaconda/bin:${PATH}
$ cd /opt
$ git clone https://github.com/chapmanb/bcbio-nextgen.git 
$ cd bcbio-nextgen
$ python setup.py develop
$ python scripts/bcbio_nextgen.py runfn organize_samples config/bcbio_system.yaml 

-jk

chapmanb commented 9 years ago

John; Thanks for the explanation and sorry for my confusion. I see the issue: I'd always directly referred to the internally installed bcbio anaconda python but don't see a harm in making this the default python on the instance so you don't need to do this. I added this to the build recipe and it'll be available when we roll a new docker image.

As an FYI, you might find this useful later on:

https://github.com/chapmanb/bcbio-nextgen-vm#updates

as it installs a new bcbio inside the container and updates the local description. I mostly use this when testing/developing and drive everything externally with bcbio_vm.

Thanks again for the helpful feedback.