-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ENH? Add Dockerfile for development inside a container #1473
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
ENH? Add Dockerfile for development inside a container #1473
Conversation
This is great -- I'm playing around with it locally. One thought is that it would be quite helpful to have a docker image that mirrors the travis build for troubleshooting. Does the scipy base image do any optimizations on the install? If not, we might use an ubuntu base image, then use the travis install scripts (and maybe a |
@ColCarroll that's a great idea |
Dockerfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be more portable, can this be ENV PYTHONPATH $PYTHONPATH:"$HOME"/pymc3
?
Using the notebook works great -- we may want to add a startup script to the One problem I got after running This should probably be a new pymc3 issue (I should be able to import pymc3 without an X server).
|
@ColCarroll that is odd, I have no such problem importing |
Are you running on linux? It may be an osx thing... I'm also surprised you did not need to add |
I am running on OS X; weird. |
Looks fine to me, if another OS X user can have it run. I'm actually getting a few test failures running the tests inside the container: I wonder if instead of wget-ing requirements.txt, you wget |
Just noting (without having reviewed it) that I generally support adding a |
I think a dockerfile is a good addition. Maybe add some documentation for On Sun, Oct 23, 2016 at 2:13 PM, Austin Rochford notifications@github.com
Peadar Coyle |
@ColCarroll I think that's a good idea, and the tests should definitely pass in the container before merging this. Do you have a suggestion for a base image that is close to what Travis uses? (I am quite a Docker novice, and don't really know exactly where to look) |
What if you used continuumio/minconda3 as the base image, then ran As an aside, it looks like there are two copies of the actual requirements -- one in create_testenv.sh, one in requirements.txt (and a few more in setup.py). Would be nice to streamline that, but I don't know much about conda environments. |
This probably needs a rebase. |
It looks like the tests were getting messed up by that same 'theano' problem that has been fixed (this should not effect the build). @AustinRochford I grabbed the changes from your branch and got tests passing inside the container. Ended up using the Up to you whether you want to update this PR to incorporate some of those changes, or I can make a new PR from my branch. |
@ColCarroll thanks for picking this up as I've been busy elsewhere the last few weeks. If you've got the tests working, I'd say go ahead an merge your work and I will close this. |
Not sure if this will be useful for others, but I like to be able to use my development code in a notebook running inside a Linux container. Here is the Dockerfile I use to do so. Even if we don't want to merge this, it could be useful for others who like that style of development.
To build the container image
To launch a container
where
$PYMC3_DIR
is the root of your PyMC3 source directory and$NOTEBOOK_DIR
is the directory where notebooks will be persisted. After this command, there will be a Jupyter notebook server running available atlocalhost:8888
.