Skip to content

Commit c68966c

Browse files
author
masoud@anyscale.com
committed
feat: Add Docker, uv, rust-toolchain for reproducible builds
- Add Dockerfile with multi-stage build (CUDA + Rust + Python) - Add docker-compose.yml for dev/test/gpu services - Add rust-toolchain.toml pinning nightly-2024-12-01 - Add pyproject.toml with uv for Python dependency management - Commit Cargo.lock and uv.lock for reproducible builds - Update CI to verify Docker build works - Update README with Docker quickstart Relates to #10 (GPU acceleration)
1 parent deb8236 commit c68966c

File tree

12 files changed

+5029
-18
lines changed

12 files changed

+5029
-18
lines changed

.dockerignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Build artifacts
6+
target/
7+
zkml/target/
8+
*.pyc
9+
__pycache__/
10+
.pytest_cache/
11+
*.egg-info/
12+
13+
# IDE
14+
.vscode/
15+
.idea/
16+
*.swp
17+
*.swo
18+
19+
# OS
20+
.DS_Store
21+
Thumbs.db
22+
23+
# Params (large files, should be mounted or downloaded)
24+
params/
25+
params_kzg/
26+
params_ipa/
27+
*.params
28+
29+
# Proofs (generated at runtime)
30+
proof
31+
proof_output/
32+
*.bin
33+
34+
# Virtual environments
35+
.venv/
36+
venv/
37+
env/
38+
39+
# Documentation
40+
docs/
41+
*.md
42+
!README.md
43+
44+
# CI/CD
45+
.github/
46+

.github/workflows/ci.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22+
# Use rust-toolchain.toml for version (pinned in repo)
2223
- name: Install Rust toolchain
23-
uses: dtolnay/rust-toolchain@nightly
24+
uses: dtolnay/rust-toolchain@master
2425
with:
26+
toolchain: nightly-2024-12-01
2527
components: rustfmt, clippy
2628

2729
- name: Cache cargo registry
@@ -64,6 +66,52 @@ jobs:
6466
run: cargo clippy --lib -- -W clippy::all || echo "::warning::Clippy warnings found (non-blocking)"
6567
continue-on-error: true
6668

67-
# Note: AWS tests are intentionally excluded from CI to save costs.
68-
# Run them manually with: cd tests/aws && python gpu_test.py
69+
# Docker build test - ensures Dockerfile works
70+
docker-build:
71+
name: Docker Build
72+
runs-on: ubuntu-latest
73+
74+
steps:
75+
- name: Checkout code
76+
uses: actions/checkout@v4
77+
78+
- name: Set up Docker Buildx
79+
uses: docker/setup-buildx-action@v3
80+
81+
- name: Build dev image
82+
uses: docker/build-push-action@v5
83+
with:
84+
context: .
85+
target: dev
86+
push: false
87+
cache-from: type=gha
88+
cache-to: type=gha,mode=max
89+
tags: distributed-zkml:dev
90+
91+
# Python dependency check
92+
python-deps:
93+
name: Python Dependencies
94+
runs-on: ubuntu-latest
95+
96+
steps:
97+
- name: Checkout code
98+
uses: actions/checkout@v4
99+
100+
- name: Install uv
101+
uses: astral-sh/setup-uv@v4
102+
with:
103+
version: "latest"
104+
105+
- name: Set up Python
106+
run: uv python install 3.11
107+
108+
- name: Install dependencies
109+
run: uv sync
110+
111+
- name: Check Python imports work
112+
run: |
113+
uv run python -c "import ray; print(f'Ray version: {ray.__version__}')"
114+
uv run python -c "from python.rust_prover import prove_chunk; print('rust_prover imports OK')"
69115
116+
# Note: AWS/GPU tests are intentionally excluded from CI to save costs.
117+
# Run them manually on GPU instances.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Rust
22
target/
3-
Cargo.lock
3+
# Cargo.lock is committed for reproducible builds (removed from ignore)
44

55
# Python
66
__pycache__/

0 commit comments

Comments
 (0)