You need to have specific permissions to create, modify and use code environments. If you do not have these permissions, contact your DSS administrator.
Create a code environment¶
Go to Administration > Code envs
Click on “New Python env”
Give an identifier to your code environment. Only use A-Z, a-z, digits and hyphens
Code environment identifiers must be globally unique to the DSS instance, so use a complete and descriptive identifier
Choose the Python version that you want to use. DSS is compatible with Python versions 2.7, 3.5, 3.6 and 3.7.
The requested version of Python must be installed on your system (by your system administrator)
In most cases, you also need the Python development headers packages in order to install packages with pip. Depending on the OS, this system package (to be installed by the system administrator) is called “libpython-dev” or “python-devel”
Click on “Create”
DSS creates the code environment and installs the minimal set of packages
If you plan to use Visual Machine Learning with this code environment, it must include the scipy, scikit-learn, jinja2 and xgboost packages.
Support of python 3 code environment on Visual Machine Learning is experimental.
You are taken to the new environment page
You can manage the list of packages to install by clicking on the “Packages to install” tab.
You see here two lists:
A non-editable list of the “Base Packages”. These are packages that are required by your current settings. These packages cannot be removed, and you cannot modify their version. For more information, see Base packages
An editable list of “Requested Packages”. This is where you write the list of packages that you want in your virtual environment. To quickly add the required packages for visual machine learning and deep learning on CPU or GPU, click on “Add Sets of Packages” and make your selections. The required packages will be added to the Requested Packages list.
The list of requested packages is in the
requirements.txt file format See the documentation about the format of requirements.txt. Each line must be a package name, optionally with constraints information.
Once you have written the packages you want, click on Save and update. DSS downloads and installs the newly required packages
Afterwards, you can inspect the exact installed versions in the “Actually installed packages” tab.
Installing packages not available through pip¶
Some packages aren’t directly available from pip and need to be installed from the source code. To install such a package in a code environment, you should:
download the source code of the package on the DSS server
in the “Packages to install” section of your code environment, fill the “Requested packages” field with:
/path/to/package/source.zipfor zipped or gzipped packages
-e /path/to/package/sourcefor unzipped packages where
sourceis a directory that contains a
click on “Save and update”.
This operation is not possible for a combined use with containerized execution and model API deployment on Kubernetes.
For automation/API nodes, the package must exist at the same path on the server.