Popular Docker images for notebook executions¶
A short recap on Docker images
Each Valohai execution is ran inside a Docker container
Your Docker image should contain most, if not all, of the packages and libraries needed to run your code (e.g. specific TensorFlow version, matplotlib, xgboost or something else).
You can use public or private Docker images
All Valohai notebook executions are based on a custom image called
You can build your own Docker images on top of
valohai/pypermillto include additional packages.
Below you’ll find list of the most commonly used Notebook images and their Dockerfiles. You can use any of these images in your executions, or build your own image on top of them.
Each of the images contains the library marked in the tag and the following libraries:
The Tensorflow images have a GPU enabled version. You’ll recognize them by the
You can change the default Docker image for your Notebook by clicking on
Settings inside your notebook.
Below you’ll find the
Dockerfile used to publish each of those images. You can build your own Docker images in a similar manner.
FROM valohai/pypermill RUN pip install --upgrade pip RUN pip install seaborn numpy pandas matplotlib valohai-utils statsmodels RUN pip install tensorflow==2.5.0
FROM valohai/pypermill RUN pip install --upgrade pip RUN pip install seaborn numpy pandas matplotlib valohai-utils statsmodels RUN pip install tensorflow==1.15.5
FROM valohai/pypermill RUN pip install --upgrade pip RUN pip install seaborn numpy pandas matplotlib valohai-utils statsmodels RUN pip install scikit-learn==0.24.2
FROM valohai/pypermill RUN apt-get update && apt-get -y install cmake RUN pip install --upgrade pip RUN pip install seaborn numpy pandas matplotlib valohai-utils statsmodels RUN pip install xgboost==1.4.2
Install additional packages during a notebook execution¶
You can also install additional package at the beginning of your Valohai execution.
Add a new cell at the top of your notebook
!pip install mylibrary mylibrary2 mylibrary3to the new cell to install 3 new packages during the execution
These packages will be installed every time you run the notebook on Valohai. You’ll have to wait for them to download and install at the beginning of each execution.
Using a custom Docker image allows you to have these packages preinstalled in the Docker image you’re using and avoid having to download them inside each execution.