Skip to content

Docker images

You can either use one of the prebuilt ipybox Docker images provided by freeact or build your own image with default or custom dependencies.

Default image

To build a default ipybox Docker image with name gradion-ai/ipybox and minimal dependencies, run:

python -m ipybox build

Custom image

To build a custom ipybox Docker image with additional Python packages preinstalled, create a dependencies.txt file that follows the Poetry dependency specification format. For example:

dependencies.txt
pandas = "^2.2"
scikit-learn = "^1.5"
matplotlib = "^3.9"

Then build the image by referencing the dependencies.txt file and optionally providing a custom tag:

python -m ipybox build -d dependencies.txt -t gradion-ai/ipybox-custom:v1

Code executed in containers of the custom gradion-ai/ipybox-custom:v1 image can now import these packages.

Note

Containers created from images that have been built without the -r or --root option will run with the same user and group IDs as the user who built the image. With the -r or --root option, containers will run as root.

Tip

You can also install packages at runtime.