My github repo Soltus/jlab-study-2023 (github.com)
I don’t know if it’s caused by the installation of some packages (which happened before) or if the URL changes because dockerfile created an account
Thank you for your guidance. I used FROM jupyer/scipy-notebook: cf6258237ff9 to successfully run server, but NOT notebook files. How can I import them?
If you’re using one of the repo2docker envs, these already ship, and are managed by mamba. Mixing interactive pip and conda install commands is probably not what you want. I can highly recommend managing all of them with a single environment.yml with some kind of pin information, e.g.
channels:
- conda-forge
- nodefaults
dependencies:
- python >=3.11,<3.12
- pip >=23,<24
- jupyterlab >=3.6,<3.7
- jupyterhub-singleuser >=3.1.1,<4
- pip:
# - only
# - things
# - not
# - on
# - conda-forge
Unfortunately, I tried it without effect. I felt like there were so many options to choose from, I was already dizzy. Before using docker, I used pip-tools generated requirements.txt. I wonder if I can still use this solution even if I use docker
If using the upstream docker stacks, the mamba approach will generally be more robust. As you have a running system, you can try using that terminal to do some forensics on what’s different between your custom binder and what a “baseline” binder would use.
However, all told: the official guidance is quite clear: doing a custom dockerfile will cost you more maintenance effort than using the “well-known” configuration locations. If you don’t have a .binder/postBuild, .binder/requirements.txt (without any -e . nonsense) or .binder/environment.yml (same, but under pip:), your env will be cached as its own layer, which is about the one can hope for.
COPY . /home/${NB_USER} seems to be effective
However, the matter is not over. I tried many images, and finally scipy-notebook. However, it seems that newer images will lead to 404. When I looked up the information, I found that some official binders also lead to 404.I guess other docker-stacks should be similar. I can’t try one by one. What I know is:
FROM jupyter/scipy-notebook:python-3.9.13 effective
FROM jupyter/scipy-notebook:python-3.10.8 ineffective
Great, except for the Python version, everything has worked as expected
However, I use COPY . /home/${NB_USER} in dockerfile to package the notebook. The side effect of this is that every time the notebook content is updated, it needs to be rebuilt. I would like to know how to separate the notebook from the environment image