Skip to content

Python2 Image

Thibault Pradal edited this page Aug 13, 2021 · 26 revisions

WARNING: This image is only compatible with Linux systems. A Windows and Mac OS version may be available later on.

Summary

Packages installed via the docker

OpenAlea packages with PPA :

APT Install :

What is the Python2 Docker image ?

With the Python3 update, most packages are currently moving into their Python3 version, and those in Python2 are no longer usable nor maintained. In order to get a stable legacy version of OpenAlea, we created this Docker image which contains all working modules at the times of Ubuntu 14.04 under Python2.

This version lacks some functionalities of future versions and will not receive any update, but you will be able to use it to quickly make old models work, or use OpenAlea while we are updating to Python3.

A Python3 image will be available later on to do the same with Python3.

How to import the image

Before anything you will need Docker in your machine :

pip install docker

Then pull the image from Docker Hub and start a container :

docker pull openalea/python2
docker run -u 0 -it --env QT_X11_NO_MITSHM=1 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix openalea/python2

You can now input command in the container as if the command prompt were your Terminal with OpenAlea packages downloaded.

Setup a working directory

In order to create on your computer a directory that serve as a link between your computer and the container, you will need to create a Docker volume, then start a container with it :

docker volume create --name oa_volume
docker run -u 0 -it --env QT_X11_NO_MITSHM=1 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v oa_volume:/home/User001/volume openalea/python2

A volume is a space in your computer that will not be deleted even if you exit or delete the container. Any file outside of this directory will be deleted upon exiting the container, so be careful.

How to use Visualea within the container

Once you launch the container, you can start Visualea in the container's shell :

visualea

Then go in Package Manager/Add/Package and create a new package in the volume (inside the home/User001/volume directory if you followed the previous commands). We will name the package oa_package. The package will be added to the package panel.

Each time you exit then launch the container, you will need to go in Window/Preferences/Package Manager, click add and select the Volume repository to make your package appear on the package panel.

Tutorial for creating a package with Visualea