I'm trying to create a project template with jupyter/datascience-notebook on docker, and I'm having some confusion about:
Have I to create a container (I use docker-compose) for each project?
In my project template, with the Dockerfile and docker-compose.yml file, I have a folder called "notebooks", that I mounted on /home/jovyan, in order to save data when I stop container, but I have also found also some cache files, is this a best practice?
How can I manage packages? I have to write in jupyter notebooks on top something like "! pip install xxxx", or in Dockerfile I have to write "RUN pip install xxxx", and "pip install" or "conda install"? both of these enviroments are recognized from jupyter? And if I have "requirements.txt", can I create a "requirements.pip.txt" for pip, and a "requirements.conda.txt" for conda? mhm..... Some best practice?
Dockerfile:
FROM jupyter/datascience-notebook:latest
EXPOSE 8888
ENV JUPYTERLAB_ENABLED=true
docker-compose.yml:
version: "3.8"
services:
jupyter:
build: .
ports:
- 8888:8888
container_name: jupyter
volumes:
- ./notebooks:/home/jovyan
This is my project now [1]: https://i.stack.imgur.com/ng55d.png