carmenalab / brain-python-interface

Other
6 stars 8 forks source link

[WIP] Docker build #33

Open TomekFraczek opened 5 years ago

TomekFraczek commented 5 years ago

Optional pull request/up for discussion

To simplify the build process and make the application more operating system agnostic, I've wrapped the install in a docker container, built out of a series of dockerfiles.

Primarily, this allows the code to work in the exact same way on every machine, and to be isolated in it's own, safe environment. Additionally, the build/install process on new machines will be reduced to a one-liner (not counting network configurations), and can be easily extended to include a stable production version (related to https://github.com/carmenalab/brain-python-interface/issues/26).

For development purposes, the build process was split into several stages: base, python and code.

This allows the docker image to be rebuilt at any of the three levels, so as few as possible of the installs are repeated. Together with dockerfile caching, this allows for very quick build times.

Other related upgrades:

TODO

As of right now, the install is incomplete, as it is still missing some packages. Packages to still be added:

Testing and Setup

What do you think? Is this a valuable way to go?

sgowda commented 5 years ago

This is cool, thanks for taking a stab at it! Docker install would be helpful and low risk since if you wanted you can always install it the hard way. I think it would be good to check (sometime closer to merge) that the config allows access to files outside of the container, like data files -- I have had some issues with that previously with Docker.

TomekFraczek commented 5 years ago

Thanks! I'll keep an eye out for that issue.

Just to clarify though, do you mean to make sure that the docker image can write data files outside of the image?

sgowda commented 5 years ago

the docker image should be able to both read and write files outside of the container. writing is needed for saving behavioral data generated during the experiment, reading is needed for analyses which need to open data files and reference task source code.