Sign inSign up

sahajs59/labx

By sahajs59

โ€ขUpdated about 2 months ago

Self-contained Python lab with JupyterLab + VS Code IDE in a single Docker container.

Image
Languages & frameworks
Machine learning & AI
Data science
0

83

sahajs59/labx repository overview

โ LabX

A self-contained, Docker-powered Python development environment combining JupyterLab and a VS Code-compatible browser IDE in a single container.

Python 3.11.9 JupyterLab 4.6.2 code-server 4.132.0 Docker MIT License


โ ๐Ÿงช What is LabX?

LabX is a batteries-included Python lab environment that runs entirely inside Docker. With a single command you get:

ToolURLPurpose
JupyterLabhttp://localhost:5959Interactive notebooks & data exploration
LabX-Server (code-server)http://localhost:5960Full VS Code IDE in the browser

Both services share the same Python environment and /workspace directory, so code you write in one is immediately available in the other.


โ โœจ Features

  • ๐Ÿ Python 3.11.9 on a slim Debian (Bookworm) base
  • ๐Ÿ““ JupyterLab 4.6.2 with the Simpledark theme pre-configured
  • ๐Ÿ–ฅ๏ธ LabX-Server (code-server 4.132.0) with custom branding, login strings, and a curated set of pre-installed VS Code extensions
  • ๐Ÿ“ฆ Rich Python package stack โ€” NumPy, Pandas, Scikit-learn, PyTorch-ready (Keras, Transformers, Accelerate), OpenCV, NLTK, spaCy, MLflow, W&B, Stable-Baselines3, Gymnasium, and more
  • ๐Ÿ”‘ Password-protected โ€” both services require authentication (default password configurable via env var)
  • ๐ŸŽจ Custom branding โ€” LabX logo replaces all code-server icons and favicons
  • ๐Ÿ”ง 17 pre-bundled VS Code extensions installed offline from .vsix files, including Python, Jupyter, Prettier, Rainbow CSV, Database Client, Code Runner, and several themes
  • ๐Ÿ—๏ธ Multi-arch โ€” supports linux/amd64 and linux/arm64
  • ๐Ÿ“ Persistent workspace โ€” mount a host directory to /workspace and your files persist across container restarts

โ ๐Ÿš€ Quick Start

โ Prerequisites
โ 1 โ€” Pull & Run (once published to a registry)
docker run -d \
  --name labx \
  -p 5959:5959 \
  -p 5960:5960 \
  -v "$(pwd)/workspace:/workspace" \
  -e LABX_PASSWORD=mysecretpassword \
  labx:latest
โ 2 โ€” Build from Source
git clone https://github.com/<your-org>/labx.git
cd labx

docker build -t labx:latest .

Then run the container:

docker run -d \
  --name labx \
  -p 5959:5959 \
  -p 5960:5960 \
  -v "$(pwd)/workspace:/workspace" \
  -e LABX_PASSWORD=mysecretpassword \
  labx:latest
โ 3 โ€” Open in your browser

Login with the password you set via LABX_PASSWORD (default: labx@123).


โ โš™๏ธ Configuration

Environment VariableDefaultDescription
LABX_PASSWORDlabx@123Shared password for both JupyterLab and LabX-Server

Tip: Always set a strong custom password in production. Pass it with -e LABX_PASSWORD=<your-password> when running the container.


Create a docker-compose.yml in your project directory:

services:
  labx:
    image: labx:latest
    container_name: labx
    ports:
      - "5959:5959"  # JupyterLab
      - "5960:5960"  # LabX-Server
    volumes:
      - ./workspace:/workspace
    environment:
      - LABX_PASSWORD=mysecretpassword
    restart: unless-stopped

Then start with:

docker compose up -d

โ ๐Ÿ“ฆ Pre-installed Python Packages

Click to expand full package list
CategoryPackages
Core ScienceNumPy, SciPy, SymPy, Pandas
VisualisationMatplotlib, Seaborn, Plotly
Machine LearningScikit-learn, MLflow, W&B (Weights & Biases)
Deep LearningKeras, Transformers, Tokenizers, SentencePiece, Accelerate, Evaluate, Datasets
Reinforcement LearningGymnasium, Stable-Baselines3
Computer VisionOpenCV, Pillow, scikit-image, imageio
NLPNLTK, spaCy, Gensim
Utilitiestqdm, joblib, requests, PyYAML, openpyxl, h5py, ipywidgets

โ ๐Ÿ”Œ Pre-installed VS Code Extensions

ExtensionPurpose
ms-python.pythonPython language support
ms-toolsai.jupyter-hubJupyterHub integration
ms-toolsai.jupyter-renderersRich notebook output renderers
formulahendry.code-runnerRun code snippets in terminal
esbenp.prettier-vscodeCode formatter
mechatroner.rainbow-csvColourised CSV editing
cweijan.vscode-database-client2Universal database GUI
buvan.sql-crackSQL query runner
ChristofKaufmann.dataframe-viewerDataFrame visual explorer
julien-.terminal-file-actionsFile actions from terminal
yandeu.five-serverLive HTML/Markdown preview
tuld01061.md-live-serverMarkdown live server
the-long-ride.markdown-themMarkdown theme
Rafael-Avalos.dark-colors-themeDark colour theme
darkmusic.carbon-rewind-themeCarbon rewind theme
mszylkowski.materialsymbolsMaterial symbols icon font
ryohidaka.github-actions-branding-previewGitHub Actions branding preview

โ ๐Ÿ“ Repository Structure

labx/
โ”œโ”€โ”€ Dockerfile              # Main multi-stage Docker build
โ”œโ”€โ”€ start.sh                # Container entrypoint โ€” starts JupyterLab & LabX-Server
โ”œโ”€โ”€ requirements.txt        # Top-level Python package list (unpinned)
โ”œโ”€โ”€ requirements-linux.txt  # Fully pinned package list for Linux/Docker
โ”œโ”€โ”€ branding/
โ”‚   โ””โ”€โ”€ logo.png            # LabX logo (applied to code-server UI)
โ”œโ”€โ”€ jupyter/
โ”‚   โ””โ”€โ”€ overrides.json      # JupyterLab default theme settings
โ””โ”€โ”€ vscode/
    โ”œโ”€โ”€ settings.json       # Default VS Code / code-server user settings
    โ””โ”€โ”€ vsix/               # Pre-bundled VS Code extensions (.vsix)

โ ๐Ÿ› ๏ธ Ports Reference

PortServiceNotes
5959JupyterLabMapped to the same host port
5960LabX-ServerMapped to the same host port

โ ๐Ÿ—๏ธ Building for Multiple Architectures

Use Docker Buildx to build for both amd64 and arm64:

docker buildx build \
  --platform linux/amd64,linux/arm64 \
  -t labx:latest \
  --push .

โ ๐Ÿค Contributing

Contributions are welcome! Here are a few ways to help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m "feat: add my feature")
  4. Push to your branch (git push origin feature/my-feature)
  5. Open a Pull Request

Please keep commits focused and descriptive.


โ ๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSEโ  file for details.


Built with โค๏ธ by the LabX Contributors

Tag summary

Content type

Image

Digest

sha256:116059236โ€ฆ

Size

3.9 GB

Last updated

about 2 months ago

docker pull sahajs59/labx:v1.0