Isolated, Reproducible NVIDIA GPU-Accelerated Docker Compose Development Environment for PyTorch & Machine Learning.
Overview • Features • Code Architecture • System Flow • Structure • Quick Start • License
A containerized machine learning development template powered by Docker Compose and NVIDIA Container Toolkit. Provides a fully isolated PyTorch environment mapped directly to your local workspace, eliminating host dependency conflicts while providing native GPU acceleration for deep learning and LLM experimentation.
| Icon | Feature | Outcome & Real Proof |
|---|---|---|
| 🚀 | Native GPU Acceleration | Docker Compose v2 GPU pass-through (capabilities: [gpu]) for high-throughput CUDA compute |
| 📁 | Live Host Volume Mapping | Real-time sync between host directory and container /workspace |
| 🛡️ | Isolated & Reproducible | Eliminates Python environment conflicts and host system pollution |
| 📓 | Interactive Workspace | Ready for interactive CLI, Jupyter, and PyTorch training scripts |
docker-compose.yml:build: .: Builds from localDockerfile.volumes: - .:/workspace: Maps host directory directly into/workspacefor real-time live synchronization.deploy.resources.reservations.devices: Configuresdriver: nvidia,count: all,capabilities: [gpu]for full GPU hardware pass-through.stdin_open: true,tty: true: Enables interactive terminal (docker compose exec) and REPL sessions.
Python_llm.ipynb: Machine learning and PyTorch GPU verification notebook.
graph TD
Host[🖥️ Host OS + NVIDIA Drivers] --> Docker[🐳 Docker Compose Engine]
Docker --> GPU[⚡ NVIDIA Container Toolkit Pass-Through]
GPU --> AppContainer[📦 PyTorch ML Container /workspace]
AppContainer --> Notebook[📓 Python_llm.ipynb Execution]
AppContainer --> Scripts[🐍 PyTorch Training Scripts]
classDef primary fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff;
classDef accent fill:#6366f1,stroke:#4f46e5,stroke-width:2px,color:#fff;
class Docker,GPU primary;
class AppContainer,Notebook,Scripts accent;
python_llm/
├── 📁 assets/ # High-resolution SVG banners
│ └── 🎨 hero.svg
├── 📄 docker-compose.yml # NVIDIA GPU container stack definition
├── 📄 Dockerfile # PyTorch + CUDA base image
├── 📄 Python_llm.ipynb # GPU verification & ML experimentation notebook
└── 📄 README.md # Documentation# 1. Build and start GPU container in background
docker compose up -d
# 2. Access interactive bash inside GPU container
docker compose exec app bash
# 3. Verify PyTorch GPU acceleration
python -c "import torch; print('CUDA Available:', torch.cuda.is_available(), '| Device:', torch.cuda.get_device_name(0))" Released under the MIT License. Crafted with precision by LoNebula