Install Domino Code Assist

Code Assist is automatically installed in Domino versions 5.5-5.8.

Prerequisites

You need the following minimum Python and Python package versions to install Code Assist:

  • python >= 3.6

  • plotly >= 5.5

  • JupyterLab == 3

If you plan to install the latest DCA version with AutoML and Foundation Models features (1.3.0+), you will also need the following specific Python package versions:

  • accelerate == 0.19.0

  • albumentations

  • attrs < 22.0.0

  • datasets == 2.12.0

  • dominodatalab; python_version >= '3.8'

  • evaluate

  • flaml

  • flaml[catboost]

  • hcrystalball

  • humanize

  • ipyvue

  • ipyvuetify >= 1.8.5

  • ipywidgets < 8

  • lightgbm

  • mlflow >= 2.4

  • nbformat >= 4.5 (to support cell IDs)

  • nltk

  • notebook >= 4.6 (to support cell IDs)

  • openpyxl

  • pandas

  • plotly >= 5.5

  • pydantic

  • reacton ~= 1.6.0

  • rouge_score

  • seqeval

  • solara[assets] ~= 1.13.0

  • statsmodels

  • timm

  • torch == 2.0.1

  • torchvision

  • transformers ⇐ 4.29.2

  • vaex-core

  • xlrd

Install Code Assist in a Workspace

The easiest way to get started with Code Assist is to install it in a Workspace.

If you don’t have a Jupyter, JupyterLab, or RStudio Workspace, learn how to launch a Workspace.

The next steps depend on the language you want to use: Python (Jupyter or JupyterLab) or R (RStudio).

  1. Run the following command in a notebook code cell:

    !pip install --user domino-code-assist
    !pip install --user domino-code-assist

    DCA install Jupyter

  2. After the installation completes, refresh your browser tab. The Domino Code Assist button appears in the Jupyter toolbar. Click this button to initialize Code Assist.

Note
When you use pip install domino-code-assist, Domino automatically adds Code Assist to the requirements.txt file of the Project. This means that all subsequent executions (including Workspaces) will install Code Assist. To learn more, see Use requirements.txt.

Upgrade an existing installation:

We do not recommend upgrading Code Assist with pip install --upgrade.

If you specified a specific version during your pip installation, edit the requirements.txt file of your Project to use the latest version of Code Assist.

If you didn’t specify a version during your pip installation, start a new Workspace to automatically install the latest version of Code Assist.

Install Code Assist in a Project

After installing Code Assist in a Project, Code Assist will be available to all Workspaces in the Project using the same compute environment.

Use a requirements.txt file to install Python packages into a new Workspace within a Project. Navigate to Files to check whether you have a requirements.txt file.

Requirements location

If you do have a requirements.txt file, it’ll be listed with your other files. Proceed with these steps:

  1. Click the requirements.txt file link.

  2. Click the Edit button.

  3. Add the domino-code-assist package to your requirements.txt file. You can specify a version like domino-code-assist==0.4.1. If you don’t specify a version, the latest version is installed.

  4. Click the Save button.

If you don’t have a requirements.txt file, follow these steps:

  1. Download our requirements-how-to.txt file.

  2. Click the Upload button. Either drag and drop or browse to find the requirements.txt file.

  3. Click the Upload button.

After you complete the installation, create a new Jupyter or JupyterLab Workspace and use the Domino Code Assist button to launch Code Assist.

Install Code Assist in a compute environment

Enable Code Assist in your organization’s most used compute environments (CE) to have Code Assist appear automatically in any Jupyter, JupyterLab, or RStudio Workspace configured with that CE. However, you must rebuild the CEs whenever there is a Code Assist update. If you cannot rebuild CEs weekly, rather install Code Assist in a Workspace or Project.

  1. Select Environments from the side navigation bar.

  2. Select the environment in which to install Code Assist.

  3. Click the Edit Definition button.

  4. Add the following code to the end of the Dockerfile section (but before the last USER ubuntu command):

RUN pip install --user domino-code-assist
RUN pip install --user domino-code-assist
  1. Click the Build button at the bottom of the page.

This installs Code Assist in every Workspace that uses the Domino Environment.

Install Code Assist from source

Install Domino Code Assist directly from the package source. Use this method if you’re in an air-gapped environment and can’t use the other installation methods due to poor internet connectivity.

  1. A public archive with the Code Assist package and its dependencies is available at https://mirrors.domino.tech/. The archive names reflect the required Code Assist and Python versions. Here are some examples:

    • dca-1.0.5-python-3.9.zip — Code Assist-1.0.5 and Python-3.9

    • dca-1.0.5-python-3.8.zip — Code Assist-1.0.5 and Python-3.8

    • dca-1.0.4-python-3.9.zip — Code Assist-1.0.4 and Python-3.9

  2. Find the version of Python running in your Domino Workspace and then download the appropriate archive. For example, Code Assist-1.0.5 for Python-3.9 would be downloaded from https://mirrors.domino.tech/dca/python/dca-1.0.5-python-3.9.zip.

  3. Upload the archive onto Domino using the Files tab.

  4. In a Jupyter Workspace on Domino, run the following commands to install the package:

    # Check the current folder. Should be /mnt. %pwd # Unzip the archive (assumes that the archive is in /mnt). !unzip -q dca-1.0.5-python-3.9.zip # Change into the resulting folder. %cd dca-archive # Check for the Code Assist package filename (optional). !ls domino_code_assist* # Install the package and all dependencies. !pip install --user --no-index --find-links=. domino_code_assist*.whl
    # Check the current folder. Should be /mnt.
    %pwd
    # Unzip the archive (assumes that the archive is in /mnt).
    !unzip -q dca-1.0.5-python-3.9.zip
    # Change into the resulting folder.
    %cd dca-archive
    # Check for the Code Assist package filename (optional).
    !ls domino_code_assist*
    # Install the package and all dependencies.
    !pip install --user --no-index --find-links=. domino_code_assist*.whl

    There might be some errors generated by pip, but you can usually ignore them.

  5. Test that the installation was successful by importing the package.

    import domino_code_assist
    import domino_code_assist

Upgrade versions

To upgrade, edit the requirements.txt file to specify the latest version of Code Assist. Alternatively, if you don’t specify a version, Domino automatically pulls the latest version when building compute environments.

Next steps

Now that you’ve installed Domino Code Assist, learn how to load data with Code Assist.