惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Exploit Database - CXSecurity.com
N
News and Events Feed by Topic
Latest news
Latest news
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
IT之家
IT之家
V
V2EX
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
小众软件
小众软件
A
Arctic Wolf
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
G
GRAHAM CLULEY
罗磊的独立博客
T
Tor Project blog
C
Cisco Blogs
美团技术团队
博客园 - Franky
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
Cyberwarzone
Cyberwarzone
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Security Latest
Security Latest
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
Spread Privacy
Spread Privacy
J
Java Code Geeks
C
CERT Recently Published Vulnerability Notes
大猫的无限游戏
大猫的无限游戏
S
Securelist
The Cloudflare Blog
博客园 - 叶小钗
D
Darknet – Hacking Tools, Hacker News & Cyber Security
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
Project Zero
Project Zero

Sealos Blog

Build a Full-Stack App with Claude Code + InsForge — Zero Backend Code | Sealos Blog InsForge vs Supabase: Which Backend for AI-Powered Development? | Sealos Blog Kubernetes NodePort Exhaustion: SSH Gateway Solution | Sealos Blog Claude Code Metrics Dashboard: Grafana Setup (2026) | Sealos Blog What Is RustFS? Apache 2.0 MinIO Alternative (2026) | Sealos Blog Claude Code Mobile: iPhone, Android & SSH (2026) | Sealos Blog Eaglercraft Server Hosting: Fast Setup (2026) | Sealos Blog An Honest Review: Migrating a Complex Microservice App from Heroku to Sealos | Sealos Blog The Ultimate Guide to Kubernetes Audit Logging for Security and Compliance | Sealos Blog Cost Optimization Shootout: Sealos Autonomous FinOps vs. Kubecost Manual Reports | Sealos Blog For CTOs: How to Cut Your Cloud Bill by 50% Without Sacrificing Performance | Sealos Blog Building Resilient Systems: A Deep Dive into Sealos High-Availability and Auto-Failover | Sealos Blog Building a Scalable Event-Driven Architecture with Sealos Managed Kafka | Sealos Blog Beyond kubectl apply: 5 GitOps Best Practices for Production-Ready CI/CD on Sealos | Sealos Blog Advanced RAG Pipelines: Why Your Choice of Vector Database (like Milvus) Matters | Sealos Blog Advanced MLOps: How to Monitor and Evaluate LLM Applications in Production | Sealos Blog A Developer's Guide to Kubernetes RBAC: Securing Your Cluster the Easy Way with Sealos | Sealos Blog A CISO's Guide to Cloud Development: Securing the CI/CD Pipeline with Sealos DevBox | Sealos Blog What is Kubernetes Multi-Tenancy? A Guide for Platform Engineers | Sealos Blog What is Infrastructure from Code (IfC)? The Next Step After Infrastructure as Code (IaC) | Sealos Blog What is GitOps? A Beginner's Guide to "Push-to-Deploy" Workflows | Sealos Blog What is eBPF? The Future of Kubernetes Networking and Security | Sealos Blog What is an "AI-Native" Platform? (And Why You Need One for MLOps) | Sealos Blog What is an Agentic Workflow? Building the Next Generation of AI Apps | Sealos Blog What is a Kubernetes Chargeback Model (And How Does it Save You Money?) | Sealos Blog What is a "Headless" Development Environment? (And How it Works with VS Code) | Sealos Blog What is a Graph-Based Vector Database? (And When to Use It Over Milvus) | Sealos Blog What is a "Cloud Operating System"? The Next Evolution of PaaS Explained | Sealos Blog The Real Cost of EKS: How Sealos Delivers a Simpler, Cheaper Kubernetes Experience | Sealos Blog The 3 Types of Kubernetes Autoscaling (HPA, VPA, CA) and How Sealos Manages Them for You | Sealos Blog Sealos vs Vercel: Why a Cloud OS Beats a Frontend Platform for Full-Stack Apps | Sealos Blog Sealos vs. Render vs. Fly.io: A 2025 Guide to the Best Heroku Alternatives | Sealos Blog Sealos vs. OpenShift: Kubernetes for Developers vs. Kubernetes for Ops Teams | Sealos Blog Sealos vs. Netlify: When to Choose a Full Kubernetes Platform over a Static Site Hoster | Sealos Blog Sealos vs. DigitalOcean App Platform: A Head-to-Head Comparison on Cost, Features, and Scalability | Sealos Blog Sealos vs. AWS Elastic Beanstalk: The Modern PaaS for Developers Who Hate YAML | Sealos Blog Sealos DevBox vs. AWS Cloud9: Why Your CDE Should Be Platform-Agnostic | Sealos Blog For Developers: Stop Wasting Time on DevOps. A 10-Minute Guide to Shipping Faster with DevBox. | Sealos Blog Deploying n8n with Docker: From Local Setups to a Radically Simple Cloud Alternative | Sealos Blog The Impact of Prompt Bloat: How the Sealos AI Proxy Can Cache Queries and Cut LLM Costs | Sealos Blog The FinOps Playbook: How to Implement Kubernetes Chargebacks and Showbacks with Sealos | Sealos Blog Smoke Testing for ML Pipelines: Catching Data and Model Errors Before They Hit Production | Sealos Blog Optimizing PostgreSQL Performance: A Guide to Sealos Managed Database Tuning | Sealos Blog Managing Kubernetes Multi-Tenancy: How Sealos Enforces Resource Quotas and Network Policies | Sealos Blog From Days to Minutes: How to Standardize Developer Environments for Your Entire Engineering Org | Sealos Blog For Platform Engineers: How to Build a Golden Path IDP (Internal Developer Platform) with Sealos | Sealos Blog For FinOps Managers: The 5 Leakiest Buckets in Your Kubernetes Budget (And How to Plug Them) | Sealos Blog For Educators & IT Admins: How to Provide a Secure, Scalable Cloud Lab for 1000+ Students on a Budget | Sealos Blog What is a Vector Database? A Beginner's Guide to Milvus, Pinecone, and More | Sealos Blog Why Your Microservices Architecture is Failing (And How a Cloud OS Can Fix It) | Sealos Blog The Power of Autoscaling: A Deep Dive into HPA, VPA, and Cluster Autoscaler | Sealos Blog The Total Economic Impact of Cloud Development Environments (CDEs) | Sealos Blog The Illustrated Guide to the Kubernetes Control Plane | Sealos Blog The MLOps Lifecycle Explained: From Data Prep to Model Deployment | Sealos Blog Beyond Vercel's AI Cloud: The Case for an AI-Native Operating System | Sealos Blog The Architecture of a Modern AI Application: A 2025 Blueprint | Sealos Blog GitHub Codespaces is Great, But Your Workflow is Incomplete. Here's Why. | Sealos Blog The Best Heroku Alternatives in 2025 for Scalability and Cost | Sealos Blog CAST AI vs. Kubecost vs. Sealos: Choosing the Right K8s Cost Management Tool | Sealos Blog DevBox vs. Gitpod vs. Replit: An Unbiased Comparison for 2025 | Sealos Blog Unlocking Hidden Savings: A Guide to Using Spot Instances Safely in Kubernetes | Sealos Blog Can a CDE Really Replace Your MacBook Pro? A Performance Benchmark | Sealos Blog The End of "Works on My Machine": Achieving 100% Reproducible Builds with DevBox | Sealos Blog The Ultimate Guide to GPU Provisioning and Management in Kubernetes | Sealos Blog Rightsizing Kubernetes Workloads: How to Stop Wasting Money on CPU and Memory Requests | Sealos Blog The 2025 Guide to Kubernetes Cost Optimization: 10 Strategies to Cut Your Bill in Half | Sealos Blog FinOps for Startups: How to Build a Cost-Conscious Culture from Day One | Sealos Blog How to Onboard a New Developer in Under 5 Minutes with Sealos DevBox | Sealos Blog Calculating Kubernetes Costs: A Breakdown of EKS, GKE, and AKS Pricing Models | Sealos Blog Case Study: How We Reduced Our Kubernetes Bill by 87% with Sealos | Sealos Blog Are You Overpaying for Managed Kubernetes? The True Cost of Vendor Lock-in | Sealos Blog Beyond Monitoring: How Sealos Autonomously Optimizes Your Cloud Spend | Sealos Blog A Practical Guide to Kubernetes Security: Hardening Your Cluster in 2025 | Sealos Blog A Secure-by-Design Development Workflow with Isolated Cloud Environments | Sealos Blog Using the Sealos AI Proxy to Manage and Cache LLM API Calls | Sealos Blog Migration Guide: Moving Your Node.js & Postgres App from Heroku to Sealos in Under an Hour | Sealos Blog Serving Machine Learning Models at Scale: A Guide to Inference Optimization | Sealos Blog Headless Development with Sealos: Using Your Local VS Code with a Powerful Cloud Backend | Sealos Blog How to Build and Deploy a RAG Pipeline with Llama 3 and Milvus on Sealos | Sealos Blog From Localhost to Production in 15 Minutes: A Full-Stack CDE Workflow with Sealos DevBox | Sealos Blog GitOps on Autopilot: Implementing a CI/CD Pipeline with Sealos and GitHub Actions | Sealos Blog Fine-Tuning Open-Source LLMs on a Budget with Sealos | Sealos Blog From Docker Compose to Kubernetes: A Simple Migration Path with Sealos | Sealos Blog Building an AI Agentic Workflow with LangChain and Sealos | Sealos Blog What is Helm for Kubernetes? The Ultimate Package Manager Explained | Sealos Blog What is a Custom Resource Definition (CRD) in Kubernetes? | Sealos Blog What is a Kubernetes StatefulSet? A Practical Guide | Sealos Blog What is a Kubernetes Ingress Controller? A Guide to Smart Traffic Routing | Sealos Blog What is a Kubernetes Operator? Automating Complex Applications | Sealos Blog What is a Kubernetes Service? A Simple Guide for Developers | Sealos Blog Streamlining Your CI/CD Pipeline with a DevBox Build Environment | Sealos Blog Why Standardized Development Environments Are Key to Team Velocity | Sealos Blog What Is GitHub Codespace? | Sealos Blog DevBox Install? Skip It Entirely. Get a Ready-to-Code Environment in One Click with Sealos DevBox. | Sealos Blog How to Set Up a DevBox: The Ultimate Guide to 1-Click Cloud Development | Sealos Blog Empowering Indie Devs and Startup Teams: How Sealos DevBox Accelerates Agile Development | Sealos Blog From Chaos to Consistency: How Sealos DevBox Transforms Enterprise Development Workflows | Sealos Blog From Campus Labs to Cloud Freedom: How Sealos DevBox Supercharges Student Development | Sealos Blog How Sealos DevBox Cut Container Commit Time from 15 Minutes to 1 Second | Sealos Blog DevBox vs Codespaces: Which Remote Dev Environment Fits You Best? | Sealos Blog
Setting Up a Collaborative Python Data Science Environment with DevBox | Sealos Blog
Sealos · 2025-09-06 · via Sealos Blog

Modern data science teams juggle Python versions, OS differences, notebook quirks, and a zoo of native dependencies. Onboard a new collaborator and you’ll often hear: “It works on my machine.” Weeks later, the same project behaves differently in CI or production. If you’ve felt the pain, this guide will show you how to turn the chaos into a smooth, reproducible, collaborative workflow using DevBox—a Nix-powered tool for creating consistent developer environments.

By the end, you’ll have a fully reproducible Python data science stack that:

  • Onboards teammates in minutes, not days
  • Keeps notebooks, linters, and tests in sync
  • Works the same on macOS and Linux
  • Scales to containers and the cloud when you need it

Let’s dive in.


DevBox is a developer tool that uses the Nix package manager under the hood to create isolated, reproducible environments on a per-project basis. You declare what you need (e.g., Python 3.11, Git, SQLite, DuckDB), and DevBox:

  • Downloads and configures those exact versions, isolated from your system
  • Produces a lock file to pin versions across the team
  • Exposes a predictable environment through a shell or scripts

In practice:

  • You track only a few small config files in Git (devbox.json and devbox.lock)
  • Teammates run devbox init/DevBox commands and get the same environment
  • No more OS-specific brew/apt instructions, no more “works on my laptop” differences

DevBox can also generate a Dockerfile from your environment for containerized workflows and integrates nicely with direnv, VS Code, and CI systems.


Data science projects benefit from DevBox’s repeatability and structure. Here’s why:

  • Reproducibility across time and machines. An experiment from six months ago should run today without dependency roulette.
  • Faster onboarding. Newcomers can get up and running with a single command instead of following a multi-page setup doc.
  • Cross-platform consistency. DevBox abstracts away the macOS vs. Linux package pain.
  • Collaboration-friendly notebooks. Tools like Jupytext and pre-commit hooks keep notebooks in sync and diffs readable.
  • Quality and security. Linting, formatting, testing, and pinned dependencies reduce drift and risk.

  • Packages from Nixpkgs: DevBox installs system-level packages (like Python, Git, SQLite) from a huge, reproducible catalog.
  • Project isolation: Each project’s environment is defined in devbox.json and locked with devbox.lock.
  • Shells and scripts: Access your environment interactively with devbox shell or run predefined commands with devbox run.
  • Integrations: With direnv, the environment activates automatically when you cd into the project. VS Code settings and Dockerfiles can be generated from DevBox config.

We’ll set up a collaborative Python data science stack with:

  • Python 3.11
  • uv (fast Python package & environment manager)
  • JupyterLab + ipykernel + Jupytext
  • Core libs: numpy, pandas, scikit-learn, matplotlib, seaborn, duckdb
  • Tooling: ruff (lint/format), black, pytest, pre-commit, nbstripout, git-lfs
  • Optional services: SQLite and DuckDB locally; Postgres in dev
  • Automation: scripts for notebooks, linting, and tests
  • CI and containerization ready

  • Git installed
  • macOS or Linux
  • Optional: direnv for automatic environment activation in a project directory
  • Install DevBox:

Create and initialize your project:

This creates devbox.json and devbox.lock (after you add packages). Commit devbox.json to your repo; devbox.lock should also be committed for consistency across the team.

Add base packages:

What these do:

  • [email protected]: System-level Python runtime
  • uv: Fast Python package manager and virtualenv creator (great for teams)
  • git, git-lfs: Source control and large file support
  • sqlite, duckdb: Lightweight local data stores
  • openssl: Avoids missing crypto headers for Python packages that need SSL

Optional: If you plan to experiment with Postgres locally:


A simple, sensible layout:


We’ll use uv to manage Python dependencies in a local .venv. Create a pyproject.toml:

Create a local virtual environment and install dependencies:

This creates a .venv folder and installs dependencies. Commit pyproject.toml (and the lockfile uv creates, typically uv.lock) for consistency.

Tip: If you want DevBox to ensure the venv is always ready, we can automate it next.


Open devbox.json and add environment variables, an init hook, and scripts. Example:

What this does:

  • Ensures a .venv exists and dependencies are installed whenever you enter devbox shell
  • Provides reusable commands:
    • devbox run notebook
    • devbox run lint
    • devbox run test
    • devbox run precommit

Optional but recommended: integrate direnv so the environment is loaded automatically when entering the project directory.

This writes an .envrc file that tells direnv to load DevBox.


Notebooks and Git don’t mix well by default. Use Jupytext to pair notebooks with Python files (easy diffs) and nbstripout to clear outputs before commits.

.pre-commit-config.yaml:

Enable hooks:

Now, when teammates commit notebooks, outputs are removed and .ipynb stays in sync with a .py representation (percent format).

To create a paired notebook:

Or create a new notebook in JupyterLab and pair it via the Jupytext menu.


Start JupyterLab:

In a new notebook cell, try:

Run linters and tests:


Local development often requires databases or object stores. A few options:

  • SQLite: Already installed; perfect for small experiments.
  • DuckDB: Great for local analytics on Parquet/CSV files.
  • Postgres: You can use the postgresql package provided by DevBox or run it in Docker.

Example: Starting a local Postgres with DevBox packages

Example Python snippet for Postgres:

Managing secrets and env vars:

  • Never commit secrets to devbox.json
  • Use direnv with a local .env file

Example .envrc:

Add .env to .gitignore and set DATABASE_URL or API keys there.


  • Commit and review the right files:
    • Commit: devbox.json, devbox.lock, pyproject.toml, uv.lock, .pre-commit-config.yaml, notebooks/, notebooks/.py (Jupytext paired), src/, tests/
    • Don’t commit: .venv/, .env, data outputs, big artifacts (use git-lfs or DVC)
  • Standardize commands: devbox run notebook, devbox run lint, devbox run test
  • Use branches and PRs with pre-commit hooks ensuring clean diffs and style
  • Use Git LFS for large binary files:
  • Consider DVC or similar tools if you need versioned datasets and pipelines

ComponentPurposeWhy it helps teams
DevBoxReproducible system-level environmentEliminates OS drift; simple onboarding
Python (3.11)RuntimePredictable interpreter across machines
uvPython deps and venv managementFast installs; consistent lockfile
JupyterLab + ipykernelNotebook IDEInteractive workflows
Jupytext + nbstripoutGit-friendly notebooksClean diffs, fewer merge conflicts
numpy/pandas/sklearnCore analytics stackStandard data science tooling
matplotlib/seabornVisualizationQuick plots and EDA
ruff/blackLint and formatConsistent code style
pytestTestingCatch regressions early
git-lfsLarge file supportTrack big data assets in Git
sqlite/duckdbLocal data storesZero-setup analytics
postgres (optional)RDBMS for devRealistic app integration scenarios

DevBox can generate VS Code settings to use the DevBox environment:

Open the folder in VS Code; the generated settings help ensure terminals run inside DevBox. You can also point the Python interpreter to .venv/bin/python for full integration (testing, linting, Jupyter kernel).


Add a simple workflow to run linters and tests in CI with DevBox:

.github/workflows/ci.yml:

This workflow:

  • Installs DevBox
  • Restores a cache (optional but speeds up builds)
  • Synchronizes Python dependencies using uv
  • Runs linters and tests inside the DevBox environment

DevBox can generate a Dockerfile that reproduces your environment in a container:

This makes it easy to:

  • Run the same environment in CI/CD
  • Share a JupyterLab instance with colleagues
  • Deploy to Kubernetes

If you’re using a modern cloud platform that simplifies Kubernetes, you can push this image to a registry and run it as a shared, browser-accessible workspace. For example, on Sealos (a cloud-native platform that streamlines multi-tenant app deployment), you can:

  • Build and push your image to a registry
  • Create an app from the image
  • Attach persistent volumes for notebooks/data
  • Expose JupyterLab via HTTPS and share the URL with your team

Learn more about running containers and apps on Sealos at https://sealos.io/.


  • Pin everything: Commit devbox.lock and uv.lock to make environments reproducible.
  • Use scripts for common tasks: devbox run notebook, devbox run test, devbox run lint. Humans remember names; machines remember commands.
  • Tame notebooks: Always pair with Jupytext and strip outputs on commit. Keep heavy computations in src/ and import into notebooks.
  • Data ergonomics: Keep data/ under version control sparingly; put large data behind git-lfs or in an object store.
  • Secrets: Use .env + direnv locally; map environment variables in CI/CD and containers.
  • Troubleshooting:
    • If Python packages need native headers (e.g., SSL), add the system package via DevBox (we added openssl).
    • If you see macOS-specific errors compiling native extensions, try adding extra build tools via DevBox (e.g., pkg-config, gcc).
    • Validate the environment with devbox shell and which python, which uv to ensure you’re using DevBox’s binaries.

  1. Clone and enter the repo:
  1. First run:
  • DevBox restores system packages
  • init_hook creates .venv and runs uv sync
  1. Start JupyterLab and create a notebook:
  1. Write a simple experiment in notebooks/eda.py (paired via Jupytext):
  1. Commit and push:
  1. Teammates pull and immediately run everything with the same environment.

As your project grows, consider adding:

  • MLflow server for experiment tracking (run locally via devbox scripts or container)
  • DVC for data and pipeline versioning
  • Ray or Dask for distributed compute (install via uv and run under DevBox)
  • Redis, MinIO, or Kafka as services for more realistic app workflows
  • Make or Taskfile for orchestrating multi-step tasks (wrap with devbox run)

  • Can Windows users participate?
    • DevBox is best on macOS and Linux. Windows users can develop in WSL2 or use a containerized workflow (Docker Desktop) generated by DevBox.
  • Why uv instead of pip or poetry?
    • uv is fast and straightforward. It plays nicely with DevBox by using the DevBox-provided Python, while giving you a project-local venv and lockfile for Python packages.
  • Should I also pin Python libraries at the Nix level?
    • Typically no. Use DevBox for system packages and uv for Python packages. This hybrid model balances reproducibility with Python ecosystem flexibility.

A collaborative data science environment should be boring—in the best possible way. Everyone gets the same tools, the same versions, and the same commands. DevBox brings Nix’s reproducibility to your daily workflow without requiring you to learn Nix. Combine it with uv for Python dependencies, Jupytext and pre-commit for notebook hygiene, and a few standard scripts, and your team will spend less time fixing environments and more time shipping insights.

From local development to CI and cloud, the setup we built:

  • Onboards teammates in minutes
  • Keeps notebooks clean and diffable
  • Runs identically across macOS, Linux, and containers
  • Scales to platforms like Sealos when you need shared, persistent, browser-based environments

Adopt this pattern once, and you’ll never want to wrangle ad-hoc setup instructions again.