The interesting thing about virtualenv is that it allows a flexible NPM-like, in-project package management for Docker. Once the code is ready for production images, install them globally within the production image. Virtualenv is installed by default in our malkab/python Docker image.
Steps:
- creating the virtualenv:
virtualenv libpyexample
- activating:
. libpyexample/bin/activate
- list packages installed:
pip list
To install:
pip3 install jupyter
To run locally, launch it in the folder containing the notebooks:
jupyter notebook
All notebooks present in the folder will be adquired, and all new ones created will be put in it.
Command Mode Shortcuts (press ESC to enable this mode):
Key | Command |
---|---|
Enter | Enter edit mode. |
Shift-Enter | Run cell, select below. |
Ctrl-Enter | Run cell. |
Alt-Enter | Run cell, insert below. |
Y | To code. |
M | To Markdown. |
R | To raw. |
1,2,3,4,5,6 | To heading 1,2,3,4,5,6. |
Up/K | Select cell above. |
Down/J | Select cell below. |
A/B | Insert cell above/below. |
X | Cut selected cell. |
C | Copy selected cell. |
Shift-V | Paste cell above. |
V | Paste cell below. |
Z | Undo last cell deletion. |
D,D | Delete selected cell. |