👩💻Develop code in a Workspace
Ontologic Workspaces are managed virtual workstations in the cloud. Workspaces allow you to develop, install, and run analyses on a version controlled machine.
Last updated
Ontologic Workspaces are managed virtual workstations in the cloud. Workspaces allow you to develop, install, and run analyses on a version controlled machine.
Last updated
In your project, navigate to the Workspaces tab on the left.
Click the Create Workspace button in the top right. A dialog will appear where you may name the new Workspace and choose a starting environment to launch within the Workspace.
Once you've provided a name and chosen a base image. Click Create. A new workspace with your chosen name will appear.
By default, workspaces are configured to request 2 CPU cores and 8 GiB of RAM. If you require additional resources, you can edit a workspace's requirements before launching the workspace.
To edit requirements click on the three vertical dot icon next to your workspace's Start button.
Click Edit in the drop down menu that appears. This will open an Edit Workspace dialog.
Here, you may edit details about your workspace, including its required resources. Once you have made your changes, click Save to apply them to the workspace.
To start a workspace, click the Start button to the right of the workspace icon. This will schedule a copy of your workspace to run with the resource configuration you requested above.
Starting a workspace normally takes fewer than 30 seconds, but can take up to a few minutes, depending on resource availability.
Once the workspace is started, an Open button will appear.
After your workspace has started, click on the workspace's Open button. This will open an embedded VSCode editor in your browser.
VSCode is a popular IDE that provides plugins to support the development and use of software in a variety of languages. Extensions can be installed to support Python, R, Java, and many other languages.
To learn more, check out VSCode's official documentation.
By default, a workspace is opened to your user's home directory.
In the explorer tab on the right hand side of VSCode, there is a special folder named files. This folder provides access to all files you've uploaded to or generated within the current project.
As you do work in your workspace, you can save files to this folder and they will be automatically synchronized with your project files.
VSCode provides access to the workspace's terminal by pressing Ctrl + ~
. In the terminal that appears you can apt/pip/conda install any software as you would on a local Linux workstation.
Workspaces are automatically saved on shutdown. From a workspace, click on the highlighted Workspaces tab on the left navigation bar. This will bring you back to the Workspaces dashboard.
Here, find the workspace you were running, and click the Stop button.
The state of the workspace will change to STOP_REQUESTED. In the background, Ontologic is gathering all of your changes and bundling them into a snapshot.
Depending on the size of the changes you made within the workspace, it can take a few minutes to complete a snapshot.
To run code from a Workspace through an auto-generated GUI, create a Tool that references that Workspace. To learn more, read the guide on creating a tool here.
Each time a Workspace is saved, it creates a version that you can always revert back to. To revert a workspace to a previous version, click on the three vertical dot icon next to your workspace's Start button. Then click on Restore Version.
This will bring up a dialog that allows you to select any previous version. Once you've selected the version you'd like to restore, click Save. The next time the workspace is launched, it will start with this version.
Restoring an old version will never destroy newer versions. You may always restore to any saved version of a Workspace.
If you have an existing workspace that you would like to base a new workspace upon, you can easily duplicate a workspace. To duplicate a workspace, click on the three vertical dot icon next to your workspace's Start button. Then click on Duplicate.
This will bring up a dialog that allows you to name the new copy of the selected workspace. Once you click Duplicate, a new workspace will be created using the same snapshot and resource requirements as the current version of the original Workspace.