From 74b9abb0678001bf7ed007d6bf8da23826fc3b72 Mon Sep 17 00:00:00 2001 From: kcz358 Date: Fri, 10 Apr 2026 06:38:52 -0700 Subject: [PATCH] chore: add Dockerfile and .dockerignore Based on pytorch/pytorch:2.9.1-cuda12.8-cudnn9-devel with system deps (ffmpeg, libsndfile1, etc.), uv for fast installs, flash-attn, and liger-kernel. .dockerignore excludes .git (token safety), data/, scripts/, wandb/, outputs/, and Python/IDE artifacts. --- .dockerignore | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 25 +++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9d4efd8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,75 @@ +# Git directory (contains tokens in remote URL) +.git +.gitignore + +# Local directories (from .gitignore) +data/ +scripts/ +wandb/ +playground/ +output/ +outputs/ +trainer_output/ +checkpoints/ + +# Python artifacts +__pycache__/ +*.py[cod] +*$py.class +*.egg-info/ +*.egg +*.so +*.pth +build/ +dist/ +develop-eggs/ +.eggs/ +sdist/ +wheels/ +MANIFEST + +# Environments +.env +.venv +venv/ +env/ +ENV/ +env.bak/ +venv.bak/ + +# IDE / editor +.vscode +.idea/ + +# Testing / coverage +.pytest_cache/ +.coverage +.coverage.* +htmlcov/ +.tox/ +.nox/ +.hypothesis/ +cover/ +nosetests.xml +coverage.xml + +# Documentation build +docs/_build/ + +# Type checkers +.mypy_cache/ +.dmypy.json +.pytype/ +.pyre/ + +# Misc +.DS_Store +*.log +.deepspeed_env +cython_debug/ +.ipynb_checkpoints +.cache + +# Docker +Dockerfile +.dockerignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b27f9c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM pytorch/pytorch:2.9.1-cuda12.8-cudnn9-devel + +# System dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + ffmpeg \ + libsndfile1 \ + libgl1-mesa-glx \ + libglib2.0-0 \ + ninja-build \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Install uv for fast package management +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/ + +WORKDIR /workspace + +# Copy source (filtered by .dockerignore) +COPY . . + +# Install lmms-engine with all extras, flash-attn, and liger-kernel +RUN uv pip install --system -e ".[all]" && \ + uv pip install --system flash-attn --no-build-isolation && \ + uv pip install --system liger-kernel