LogoLogo
  • Ulap User Documentation
  • Guides
    • Configure Your Ulap Account
    • Connect Ulap to Your Cloud
      • AWS
        • AWS Pre-Requisites
          • 1 - Create New AWS IAM User
          • 2 - AWS IAM Policies
          • 3 - Configure AWS Cost Explorer
        • Configure AWS Cloud Provider
        • Deploy AWS Cluster
      • Azure
      • GCP
      • IBM
    • Ulap Workspaces
      • Create a Workspace
    • Deploy cluster in workspace
      • Create new cluster
      • Connect your cluster
      • Monitor & manage cluster
      • Delete Cluster
    • Deploy CloudSense App
    • Deploy Custom App
  • Fundamentals
    • Ulap Overview
    • Ulap Personas
    • Ulap Roles
    • Ulap Workspace
    • Ulap Clusters
    • Ulap Apps
  • Use Cases
    • For Data Scientist
      • Conda Quickstart
      • Connecting to MLflow
    • For Engineers
      • GitHub Integration
    • For DevOps
      • Intercom Integration
  • Extras
    • Keyboard Shortcuts
Powered by GitBook
On this page
  • About
  • Prerequisites
  • Procedure
  • Install Miniconda
  • Create Conda Environment
  • Install and Configure Jupyter Widgets
  • Validation
  1. Use Cases
  2. For Data Scientist

Conda Quickstart

Quick tutorial for setting up conda environments from jupyterhub in CloudSense.

PreviousFor Data ScientistNextConnecting to MLflow

Last updated 2 years ago

About

In this guide you will learn how to set up a conda environment in CloudSense which will enable you to start modeling using jupyterhub, scikit-learn, tensorflow and MLflow.

Prerequisites

Procedure

Here you will install Miniconda and create an environment containing common data science packages such as pandas, numpy, matplotlib, scikit-learn and tensorflow.

Install Miniconda

  • Navigate to workspace > apps > deployed apps and click on the jupyterhub app URL to open jupyterhub.

  • Open a terminal in jupyterhub.

Enter the following to download and install Miniconda 4.12.0. Near the end of the installation you will be prompted to initialize the conda environment for bash. Enter no and proceed with the next step.

wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh

Set your paths, initialize conda for bash environment and update the bash environment.

export PATH="/home/jovyan/miniconda3/bin:$PATH"
conda init bash
source ~/.bashrc

Create Conda Environment

In the same terminal session, enter the following commands to create and activate an environment with python 3.9.

conda create -n env_name python==3.9
conda activate env_name

Install the latest common data science packages

conda install scikit-learn pandas numpy matplotlib ipykernel ipython_genutils boto3 requests
pip install tensorflow mlflow ipywidgets

Add conda environment to jupyterhub kernel list

ipython kernel install --user --name=env_name

Install and Configure Jupyter Widgets

To install jupyter widgets, the widget package should be installed in the conda environment as well as the global environment. The installation in the conda environment was completed in the previous step so here we will install in the global environment.

First, we need to enable the extension manager, by navigating to the extension manager > warning and clicking 'enable'. Then install the jupyter-widgets extension by searching for @jupyter-widgets/jupyterlab-manager and click install.

Once installed, open a new terminal and run the following command to install ipywidgets to the global environment.

pip install ipywidgets

Restart you jupyterhub application by closing the window and opening a new jupyterhub window.

Validation

To validate the installation of your packages, run the following command in your conda environment. After executing you'll receive a list of all the packages installed in your conda environment.

conda list

Configure your cloud environment
Create your workspace
Deploy a cluster
Deploy MLflow and Jupyterhub