JupyterLab is a web-based interactive development environment for notebooks, code, and data. It provides a flexible interface for data science workflows.
JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar building blocks of the classic Jupyter Notebook in a flexible and powerful user interface.
Key Features:
version: '3.8'
services:
jupyter:
image: jupyter/scipy-notebook:latest
container_name: dxflow-jupyter
# Web interface port
ports:
- "8888:8888"
# Volumes for persistent data
volumes:
- ./notebooks:/home/jovyan/work
- ./data:/home/jovyan/data
# Environment variables
environment:
- JUPYTER_ENABLE_LAB=yes
- JUPYTER_TOKEN=your-secret-token
- GRANT_SUDO=yes
# Resource limits
deploy:
resources:
limits:
cpus: '8'
memory: 16G
# User permissions
user: root
command: start-notebook.sh --NotebookApp.token='your-secret-token'
# Create directories
mkdir -p notebooks data
# Deploy Jupyter Lab
dxflow compose create --identity jupyter jupyter.yml
dxflow compose start jupyter
# Access Jupyter Lab
# Open browser: http://localhost:8888
# Token: your-secret-token
# Example Python notebook
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Load data
data = pd.read_csv('/home/jovyan/data/dataset.csv')
# Analyze
data.describe()
# Visualize
plt.figure(figsize=(10, 6))
plt.plot(data['x'], data['y'])
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.title('Data Visualization')
plt.show()
# Upload data files
dxflow fs upload /local/dataset.csv data/
# Download notebooks
dxflow fs download notebooks/ /local/notebooks/
Data Science Stack:
Optional GPU Support:
# Add GPU support for ML/DL
services:
jupyter:
image: jupyter/tensorflow-notebook:latest
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
Light Workloads:
Standard Workloads:
Popular JupyterLab extensions:
# Install extensions inside container
dxflow compose execute jupyter -- \
pip install jupyterlab-git jupyterlab-lsp
# Code formatter
pip install jupyterlab_code_formatter black
# Table of contents
pip install jupyterlab-toc
Organize Your Work:
Performance:
Start your data science journey with Jupyter Lab's interactive environment!