Skip to content

Commit 030433e

Browse files
authored
chore: add Dockerfile and .dockerignore (#153)
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.
1 parent b77395c commit 030433e

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

.dockerignore

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Git directory (contains tokens in remote URL)
2+
.git
3+
.gitignore
4+
5+
# Local directories (from .gitignore)
6+
data/
7+
scripts/
8+
wandb/
9+
playground/
10+
output/
11+
outputs/
12+
trainer_output/
13+
checkpoints/
14+
15+
# Python artifacts
16+
__pycache__/
17+
*.py[cod]
18+
*$py.class
19+
*.egg-info/
20+
*.egg
21+
*.so
22+
*.pth
23+
build/
24+
dist/
25+
develop-eggs/
26+
.eggs/
27+
sdist/
28+
wheels/
29+
MANIFEST
30+
31+
# Environments
32+
.env
33+
.venv
34+
venv/
35+
env/
36+
ENV/
37+
env.bak/
38+
venv.bak/
39+
40+
# IDE / editor
41+
.vscode
42+
.idea/
43+
44+
# Testing / coverage
45+
.pytest_cache/
46+
.coverage
47+
.coverage.*
48+
htmlcov/
49+
.tox/
50+
.nox/
51+
.hypothesis/
52+
cover/
53+
nosetests.xml
54+
coverage.xml
55+
56+
# Documentation build
57+
docs/_build/
58+
59+
# Type checkers
60+
.mypy_cache/
61+
.dmypy.json
62+
.pytype/
63+
.pyre/
64+
65+
# Misc
66+
.DS_Store
67+
*.log
68+
.deepspeed_env
69+
cython_debug/
70+
.ipynb_checkpoints
71+
.cache
72+
73+
# Docker
74+
Dockerfile
75+
.dockerignore

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM pytorch/pytorch:2.9.1-cuda12.8-cudnn9-devel
2+
3+
# System dependencies
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
git \
6+
ffmpeg \
7+
libsndfile1 \
8+
libgl1-mesa-glx \
9+
libglib2.0-0 \
10+
ninja-build \
11+
curl \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# Install uv for fast package management
15+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
16+
17+
WORKDIR /workspace
18+
19+
# Copy source (filtered by .dockerignore)
20+
COPY . .
21+
22+
# Install lmms-engine with all extras, flash-attn, and liger-kernel
23+
RUN uv pip install --system -e ".[all]" && \
24+
uv pip install --system flash-attn --no-build-isolation && \
25+
uv pip install --system liger-kernel

0 commit comments

Comments
 (0)