How to create a code studio template programmatically

DrissiReda
DrissiReda Registered Posts: 76 ✭✭✭✭✭

I have an airgapped environment for which I prepare my Dataiku VM beforehand by a cloud-init script. This means all setup is done automatically via python or dsscli/dssadmin cli commands.

This VM already contains the container image for container execution and visual recipes so custom python jobs, jupyter notebooks, visual recipes and code environments ( with local pip repository) work well without internet.

Is there a mechanism to establish a basic visual studio code template and build this template's container image for usage using a script or API?

Ideally this image will be enough even for other templates, where the only things needed to download on top of the base image comes from the local pip repository.

Is there any way to accomplish this?

Operating system used: ubuntu 22

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,574 Neuron

    There are no APIs for creating Code Studio templates but you can build them using the Python API:

    https://developer.dataiku.com/latest/concepts-and-examples/code-studios.html#build-a-code-studio-template

    We have resorted to custom deploy the templates into the relevnt place in DSS's DATA_DIR and this works fine for us but it is not supported. Code Studios templates need to include the relevant Python code environments users want to use. You can add multiple Python code environments into a single Code Studios template but this makes the template image much bigger and slow to build and download into the nodes when required. Every time you change a Python code environment used in a Code Studios template you should rebuild the Code Studios template. There is an option on the Python code environment screen to do this automatically. Provided your local pip repository is a full mirror of pypi you shouldn't have issues but note this won't prevent the installation of malware Python packages, it merelly blocks internet access.

Setup Info
    Tags
      Help me…