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

How to run image once built #29

Open
mmingay2 opened this issue Sep 18, 2018 · 2 comments
Open

How to run image once built #29

mmingay2 opened this issue Sep 18, 2018 · 2 comments

Comments

@mmingay2
Copy link

Thanks for creating this. I am trying to build the image and run it.

python test.py works well so I build the image with docker build -t igvtest3 ./context and it builds fine.

Then I try to run it with docker run --rm -p 8080:8080 igvtest3:latest and it hangs for a while then I ctrl+c and get an error related to the SocketServer.py. Error looks like this:

File "on_startup.py", line 95, in
start_server()
File "on_startup.py", line 82, in start_server
SocketServer.TCPServer(("", 80), Handler).serve_forever()
File "/usr/local/lib/python2.7/SocketServer.py", line 231, in serve_forever
poll_interval)
File "/usr/local/lib/python2.7/SocketServer.py", line 150, in _eintr_retry
return func(*args)
KeyboardInterrupt

any suggestions?

thanks,

Matt

@mccalluc
Copy link
Member

@mmingay2 : Sorry to miss this. I'll look at it latter today and try to say something useful. Thanks!

@scottx611x
Copy link
Member

scottx611x commented Oct 22, 2018

@mmingay2 Sorry for missing this as well.

The following should get you a local instance running at http://localhost:8080

docker run -p 8080:80 -e INPUT_JSON_URL=https://raw.githubusercontent.com/refinery-platform/docker_igv_js/master/input_fixtures/good/input.json docker_igv_js

The caveat here being that we are providing input files to the conatiner in a very specific means based off of a JSONSchema in our parent project: refinery-platform. We are providing said input data through a JSON file either from a url (INPUT_JSON_URL, as I've done in the example above) or within an env var passed directly to the container (INPUT_JSON).

Our input format may be overkill for your needs so I see two paths if you are still interested in utilizing what we have:

  • Construct your own INPUT_JSON and provide it to the container as an envvar

    • docker run -p 8080:80 -e INPUT_JSON='
        {
          "node_info": {
            "id-1": {
              "file_url": "https://raw.githubusercontent.com/igvteam/igv/master/test/data/bed/intervalTest.bed",
              "node_solr_info": {"name": "track-name"}
            }
          },
          "parameters": [
            {"name": "Genome Build", "value": "hg19"}
          ]
        }' gehlenborglab/docker_igv_js
      
  • Or fork this repo and take a stab at editing get_refinery_input() & write_igv_configuration() as needed. If you choose this path we'll be more than happy to help.

Again, apologies that we hadn't envisioned this as a more general-purpose solution!


EDIT: I've since updated the README

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

3 participants