domino logo
Tech Ecosystem
Get started with Python
Step 0: Orient yourself to DominoStep 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get started with R
Step 0: Orient yourself to Domino (R Tutorial)Step 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get Started with MATLAB
Step 1: Orient yourself to DominoStep 2: Create a Domino ProjectStep 3: Configure Your Domino ProjectStep 4: Start a MATLAB WorkspaceStep 5: Fetch and Save Your DataStep 6: Develop Your ModelStep 7: Clean Up Your Workspace
Step 8: Deploy Your Model
Scheduled JobsLaunchers
Step 9: Working with Domino Datasets
Domino Reference
Notifications
On-Demand Open MPI
Configure MPI PrerequisitesFile Sync MPI ClustersValidate MPI VersionWork with your ClusterManage Dependencies
Projects
Projects OverviewProjects PortfolioReference ProjectsProject Goals in Domino 4+
Git Integration
Git Repositories in DominoGit-based ProjectsWorking from a Commit ID in Git
Jira Integration in DominoUpload Files to Domino using your BrowserFork and Merge ProjectsSearchSharing and CollaborationCommentsDomino File SystemCompare File Revisions
Revert Projects and Files
Revert a FileRevert a Project
Archive a Project
Advanced Project Settings
Project DependenciesProject TagsRename a ProjectSet up your Project to Ignore FilesUpload files larger than 550MBExporting Files as a Python or R PackageTransfer Project Ownership
Domino Runs
JobsDiagnostic Statistics with dominostats.jsonNotificationsResultsRun Comparison
Advanced Options for Domino Runs
Run StatesDomino Environment VariablesEnvironment Variables for Secure Credential StorageUse Apache Airflow with Domino
Scheduled Jobs
Domino Workspaces
WorkspacesUse Git in Your WorkspaceRecreate A Workspace From A Previous CommitUse Visual Studio Code in Domino WorkspacesPersist RStudio PreferencesAccess Multiple Hosted Applications in one Workspace Session
Spark on Domino
On-Demand Spark
On-Demand Spark OverviewValidated Spark VersionConfigure PrerequisitesWork with your ClusterManage DependenciesWork with Data
External Hadoop and Spark
Hadoop and Spark OverviewConnect to a Cloudera CDH5 cluster from DominoConnect to a Hortonworks cluster from DominoConnect to a MapR cluster from DominoConnect to an Amazon EMR cluster from DominoRun Local Spark on a Domino ExecutorUse PySpark in Jupyter WorkspacesKerberos Authentication
On-Demand Ray
On-Demand Ray OverviewValidated Ray VersionConfigure PrerequisitesWork with your ClusterManage DependenciesWork with Data
On-Demand Dask
On-Demand Dask OverviewValidated Dask VersionConfigure PrerequisitesWork with Your ClusterManage DependenciesWork with Data
Customize the Domino Software Environment
Environment ManagementDomino Standard EnvironmentsInstall Packages and DependenciesAdd Workspace IDEsAdding Jupyter Kernels
Use Custom Images as a Compute Environment
Pre-requisites for Automatic Custom Image CompatibilityModify the Default Workspace ToolsCreate a Domino Image with an NGC ContainerCreate a Domino Environment with a Pre-Built ImageManually Modify Images for Domino Compatibility
Partner Environments for Domino
Use MATLAB as a WorkspaceUse Stata as a WorkspaceUse SAS as a Workspace
Advanced Options for Domino Software Environment
Publish in Domino with Custom ImagesInstall Custom Packages in Domino with Git IntegrationAdd Custom DNS Servers to Your Domino EnvironmentConfigure a Compute Environment to User Private Cran/Conda/PyPi MirrorsUse TensorBoard in Jupyter Workspaces
Publish your Work
Publish a Model API
Model Publishing OverviewModel Invocation SettingsModel Access and CollaborationModel Deployment ConfigurationPromote Projects to ProductionExport Model ImageExport to NVIDIA Fleet Command
Publish a Web Application
App Publishing OverviewGet Started with DashGet Started with ShinyGet Started with FlaskContent Security Policies for Web Apps
Advanced Web Application Settings in Domino
App Scaling and PerformanceHost HTML Pages from DominoHow to Get the Domino Username of an App Viewer
Launchers
Launchers OverviewAdvanced Launcher Editor
Assets Portfolio Overview
Model Monitoring and Remediation
Monitor WorkflowsData Drift and Quality Monitoring
Set up Monitoring for Model APIs
Set up Prediction CaptureSet up Drift DetectionSet up Model Quality MonitoringSet up NotificationsSet Scheduled ChecksSet up Cohort Analysis
Set up Model Monitor
Connect a Data SourceRegister a ModelSet up Drift DetectionSet up Model Quality MonitoringSet up Cohort AnalysisSet up NotificationsSet Scheduled ChecksUnregister a Model
Use Monitoring
Access the Monitor DashboardAnalyze Data DriftAnalyze Model QualityExclude Features from Scheduled Checks
Remediation
Cohort Analysis
Review the Cohort Analysis
Remediate a Model API
Monitor Settings
API TokenHealth DashboardNotification ChannelsTest Defaults
Monitoring Config JSON
Supported Binning Methods
Model Monitoring APIsTroubleshoot the Model Monitor
Connect to your Data
Data in Domino
Datasets OverviewProject FilesDatasets Best Practices
Connect to Data Sources
External Data VolumesDomino Data Sources
Connect to External Data
Connect to Amazon S3 from DominoConnect to Azure Data Lake StorageConnect to BigQueryConnect to DataRobotConnect to Generic S3 from DominoConnect to Google Cloud StorageConnect to IBM DB2Connect to IBM NetezzaConnect to ImpalaConnect to MSSQLConnect to MySQLConnect to OkeraConnect to Oracle DatabaseConnect to PostgreSQLConnect to RedshiftConnect to Snowflake from DominoConnect to Teradata
Work with Data Best Practices
Work with Big Data in DominoWork with Lots of FilesMove Data Over a Network
Advanced User Configuration Settings
User API KeysDomino TokenOrganizations Overview
Use the Domino Command Line Interface (CLI)
Install the Domino Command Line (CLI)Domino CLI ReferenceDownload Files with the CLIForce-Restore a Local ProjectMove a Project Between Domino DeploymentsUse the Domino CLI Behind a Proxy
Browser Support
Get Help with Domino
Additional ResourcesGet Domino VersionContact Domino Technical SupportSupport Bundles
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Domino Reference
>
Domino Workspaces
>
Use Visual Studio Code in Domino Workspaces

Use Visual Studio Code in Domino Workspaces

Some Domino standard environments support launching Visual Studio Code (VSCode) in interactive Workspaces. VSCode is an open-source multi-language editor maintained by Microsoft. Domino can serve the VSCode application to your browser with the power of code-server from Coder.com.

Prerequisites

VSCode support is available in the latest versions of the Domino standard environments:

Domino Standard Environment
  • quay.io/domino/standard-environment:ubuntu18-py3.8-r4.1-domino5.1

  • quay.io/domino/standard-environment:ubuntu18-py3.8-r4.1-domino5.1-gpu

  • quay.io/domino/standard-environment:ubuntu18-py3.8-r4.1-domino5.1-fuse

Domino Spark Environment
  • quay.io/domino/spark-environment:ubuntu18-py3.8-r4.1-spark3.2.0-hadoop3.3.1-domino5.1

Domino Ray Environment
  • quay.io/domino/ray-environment:ubuntu18-py3.8-r4.1-ray1.9.2-domino5.1

Domino Dask Environment
  • quay.io/domino/dask-environment:ubuntu18-py3.8-r4.1-dask2022.1.0-domino5.1

You can also find older style environments with vscode support if you would like to use an older version of Python or R:

Domino Analytics Distribution for Python 2.7
  • quay.io/domino/base:Ubuntu18_DAD_Py2.7_R3.5-20190501

Domino Analytics Distribution for Python 3.7
  • quay.io/domino/base:Ubuntu18_DAD_Py3.7_R3.5-20190501

Launch a VSCode workspace

When using a VSCode-equipped Domino environment you can launch VSCode from the Workspaces Dashboard just as you would launch an RStudio or Jupyter workspace.

vscode workspace launch

If launched this way, your Workspace will open with the Domino controls around a VSCode editor. You can work with your project files in VSCode, and commit and sync with the Domino Workspace UI as normal.

Screen Shot 2019 05 16 at 9.49.29 AM

You can also configure JupyterLab to have VSCode as an available notebook option. All the environments listed above come with jupyter-server-proxy already installed, so you will only need to update your JupyterLab config to add a new notebook tile type. See Using Jupyter Server Proxy for more details about how to do this.

If launched this way, JupyterLab will open a new tab that will serve the VSCode application. This editor is running in the same Domino Run container as your JupyterLab application. However, the VSCode tab will not show the Domino Workspace controls. If you want to sync, commit, or stop your Workspace after working in VSCode, you must do so from the JupyterLab tab.

Install VSCode extensions

You can install VSCode extensions in the following ways:

  1. Use the pre-run script.

  2. Use VSCode’s Extensions Manager.

Use the pre-run script
  1. Go to the environment.

  2. Click Edit Environment.

  3. In Pre Run Script, paste the following:

    code-server --install-extension <extension-name> --extensions-dir ${HOME}/.local/share/code-server/extensions
  4. Click Build.

Use VSCode’s Extensions Manager

Use the VSCode’s Extensions Manager to install extensions from the marketplace. You must build the extensions in your environment to make them available in every new VSCode workspace.

Screen Shot 2019 05 16 at 10.01.25 AM

  1. Find the extension you want to install in the Visual Studio Marketplace. For example, install the scala-lang extension.

  2. Microsoft obscures the download URL for the extension by default. Open your browser’s development tools, then click Download extension.

    Screen Shot 2019 05 16 at 10.11.24 AM

  3. Get the download URL for the extension from the request details in your browser’s development tools. It ends with /vspackage. Copy this URL.

    Screen Shot 2019 05 16 at 10.14.00 AM

  4. In Domino, create a new environment. As the base image, use one of the VSCode-equipped Domino Standard Environments, listed in the prerequisites.

    Screen Shot 2019 05 16 at 10.17.42 AM

  5. Add the following instructions to your environment’s Dockerfile. Replace the folder names and example /vspackage URL with the extension URL you retrieved previously. These commands download the extension, extract the required files, and adds them to the appropriate folder.

    USER root
    
    RUN apt-get update
    RUN apt-get install -y bsdtar
    RUN mkdir -p /home/ubuntu/.local/share/code-server/extensions/ms-python.python-2019.3.6558
    RUN cd /home/ubuntu/.local/share/code-server/extensions/ms-python.python-2019.3.6558
    RUN curl -JL https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2019.3.6558/vspackage | bsdtar -xvf - extension
    
    RUN cd /home/ubuntu/.local/share/code-server/extensions/ms-python.python-2019.3.6558/extension/ && mv * ../
    RUN chown ubuntu:ubuntu /home/ubuntu/.local/share/code-server/
    
    USER ubuntu
  6. Click Build. After a successful build, you can use this new environment to launch VSCode Workspace sessions with the extensions already installed.

Install VSCode

You can add VSCode to an environment that does not include it. The base environment must be 2018-05-23 or newer.

  1. Add the following to your compute environment docker file instructions:

    USER root
    
    # Install VSCode (we install an older version so the python extension works)
    RUN curl -fOL https://github.com/cdr/code-server/releases/download/v3.10.2/code-server_3.10.2_amd64.deb && \
        dpkg -i code-server_3.10.2_amd64.deb
    
    # Add a VSCode start script
    RUN mkdir -p /opt/domino/workspaces/vscode && \
        chown -R ubuntu:ubuntu /opt/domino/workspaces/vscode && \
        echo "#!/bin/bash" >> /opt/domino/workspaces/vscode/start && \
        echo "SETTINGS_DIR=\${DOMINO_WORKING_DIR}/.vscode" >> /opt/domino/workspaces/vscode/start && \
        echo "FILE=\${SETTINGS_DIR}/settings.json" >> /opt/domino/workspaces/vscode/start && \
        echo "# Add a user setting file if it doesn't exist. Add in DOMINO_WORKING_DIR so it persists across sessions" >> /opt/domino/workspaces/vscode/start && \
        echo "if [ ! -f \"\$FILE\" ]; then" >> /opt/domino/workspaces/vscode/start && \
        echo "sudo mkdir -p \"\${FILE%/*}\"" >> /opt/domino/workspaces/vscode/start && \
        echo "sudo chown -R ubuntu:ubuntu \${SETTINGS_DIR}" >> /opt/domino/workspaces/vscode/start && \
        echo "printf \"{" >> /opt/domino/workspaces/vscode/start && \
        echo "\t\\\"extensions.autoUpdate\\\": false," >> /opt/domino/workspaces/vscode/start && \
        echo "\t\\\"extensions.autoCheckUpdates\\\": false," >> /opt/domino/workspaces/vscode/start && \
        echo "\t\\\"python.pythonPath\\\": \\\"\$(which python)\\\"," >> /opt/domino/workspaces/vscode/start && \
        echo "\t\\\"workbench.startupEditor\\\": \\\"none\\\"," >> /opt/domino/workspaces/vscode/start && \
        echo "\t\\\"workbench.colorTheme\\\": \\\"Default Dark+\\\"" >> /opt/domino/workspaces/vscode/start && \
        echo "}\" > \${FILE}" >> /opt/domino/workspaces/vscode/start && \
        echo "fi" >> /opt/domino/workspaces/vscode/start && \
        echo "code-server \${DOMINO_WORKING_DIR} --user-data-dir \${SETTINGS_DIR} --auth none --bind-addr 0.0.0.0:8888 --extensions-dir \${HOME}/.local/share/code-server/extensions --disable-telemetry" >> /opt/domino/workspaces/vscode/start && \
        chmod +x /opt/domino/workspaces/vscode/start
    
    USER ubuntu
  2. Add the following to your compute environment’s Pluggable Workspace Tools:

    vscode:
       title: "vscode"
       iconUrl: "https://raw.github.com/dominodatalab/workspace-configs/develop/workspace-logos/vscode.svg?sanitize=true"
       start: [ "/opt/domino/workspaces/vscode/start" ]
       httpProxy:
          port: 8888
          requireSubdomain: false
Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.