# Guix-Jupyter: Towards self-contained, reproducible notebooks

**URL:** <https://discourse.jupyter.org/t/guix-jupyter-towards-self-contained-reproducible-notebooks/2379>\
**Category:** Notebook\
**Created:** [October 11, 2019, 2:47pm UTC](https://discourse.jupyter.org/t/guix-jupyter-towards-self-contained-reproducible-notebooks/2379 "2019-10-11T14:47:52Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![dhirschfeld](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/dhirschfeld/32/26_2.png) [@dhirschfeld](https://discourse.jupyter.org/u/dhirschfeld)\
**Post date:** [January 11, 2020, 1:00am UTC](https://discourse.jupyter.org/t/guix-jupyter-towards-self-contained-reproducible-notebooks/2379/9 "2020-01-11T01:00:17Z")

</div>

It seems to be conflating two separate things - notebooks / analytics scripts and packaging the environments required to run them.

`conda` is the best tool we have for creating reproducible analytics environments and as you point out containers solve the “system software” issue.

> _[conda] is generally [not very good at reproducing software environments at different points in time or space](https://twitter.com/luispedrocoelho/status/1087685131144495104)_

In your linked tweet it sounds like the environment wasn’t saved with [explicit specs](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments). Whilst it’s appropriate to (optimistically) loosely pin your dependency versions in your `meta.yaml` to ensure reproducibility of an environment you should export an explicit `env-spec.txt` which _exactly_ pins down the dependency versions, build numbers and even channels.

Creating a docker container with this environment ensures replicability and publishing the explicit `env-spec.txt` allows the environment to be reproduced locally.

Our internal CI/CD automatically builds docker images and as part of that bakes in the `env-spec.txt` for the environment so that it’s always available. In the case of web-app containers the `env-spec.txt` is made available on a `/api/env-spec` endpoint.

Packaging is complicated but that can be alleviated by automation exactly as is done with Binder. Other than not listing the _explicit_ specs for the environment I’m not sure what reproducibility issues Binder _doesn’t_ solve?

> _Last but not least, we still haven’t solved the core issue, which is that notebooks are not self-contained: they do not describe the dependencies they need._

I think this is where we disagree - I don’t think they should. IMHO that’s the job of a proper package manager, `conda` and package specification DSL - `meta.yaml`

---

_[View the full topic](https://discourse.jupyter.org/t/guix-jupyter-towards-self-contained-reproducible-notebooks/2379)._
