|
| 1 | +# Pixi configuration for Forge |
| 2 | +# This replaces the conda-based installation with pixi environment manager |
| 3 | +# |
| 4 | +# Copyright (c) Meta Platforms, Inc. and affiliates. |
| 5 | +# All rights reserved. |
| 6 | + |
| 7 | +[workspace] |
| 8 | +name = "forge" |
| 9 | +version = "0.1.0" |
| 10 | +description = "A PyTorch native platform for post-training generative AI models" |
| 11 | +channels = ["conda-forge", "pytorch", "nvidia"] |
| 12 | +platforms = ["linux-64"] |
| 13 | + |
| 14 | +[system-requirements] |
| 15 | +linux = "5.10" |
| 16 | +cuda = "12.8" |
| 17 | + |
| 18 | +# System dependencies from conda-forge |
| 19 | +[dependencies] |
| 20 | +python = "3.10.*" |
| 21 | +openssl = "*" |
| 22 | +# RDMA and InfiniBand libraries (equivalent to rdma-core, libibverbs) |
| 23 | +rdma-core = "*" |
| 24 | +# Git for installing from git repos |
| 25 | +git = "*" |
| 26 | +# Use uv for fast Python package installation |
| 27 | +uv = ">=0.1.0" |
| 28 | + |
| 29 | +# Development dependencies (equivalent to [dev] extras) |
| 30 | +[feature.dev.dependencies] |
| 31 | +pre-commit = "*" |
| 32 | +pytest = "*" |
| 33 | +pytest-cov = "*" |
| 34 | +pytest-timeout = "*" |
| 35 | +tensorboard = "*" |
| 36 | +tomli = ">=1.1.0" |
| 37 | +anyio = "*" |
| 38 | +pytest-asyncio = "*" |
| 39 | + |
| 40 | +# Documentation dependencies (equivalent to [docs] extras) |
| 41 | +[feature.docs.dependencies] |
| 42 | +sphinx = "==7.2.6" |
| 43 | +matplotlib = "*" |
| 44 | + |
| 45 | +[tasks] |
| 46 | +# Installation tasks using uv for faster package management |
| 47 | +# uv will use the configuration from pyproject.toml [tool.uv] section |
| 48 | +install-pytorch = """ |
| 49 | + uv pip install torch==2.9.0 --index-url https://download.pytorch.org/whl/cu128 |
| 50 | +""" |
| 51 | + |
| 52 | +# CRITICAL: Install vLLM dependencies BEFORE installing vLLM itself |
| 53 | +install-vllm-reqs = """ |
| 54 | + uv pip install -r .github/packaging/vllm_reqs_12_8.txt |
| 55 | +""" |
| 56 | + |
| 57 | +install-vllm-deps = """ |
| 58 | + uv pip install six && \ |
| 59 | + uv pip install "setuptools<80" |
| 60 | +""" |
| 61 | + |
| 62 | +# Install vLLM after all dependencies are resolved |
| 63 | +install-vllm = """ |
| 64 | + uv pip install vllm --no-cache-dir --index-url https://download.pytorch.org/whl/preview/forge |
| 65 | +""" |
| 66 | + |
| 67 | +install-torchstore = """ |
| 68 | + uv pip install "git+https://github.com/meta-pytorch/torchstore.git@no-monarch-2025.12.17" |
| 69 | +""" |
| 70 | + |
| 71 | +install-forge = """ |
| 72 | + uv pip install -e ".[dev]" |
| 73 | +""" |
| 74 | + |
| 75 | +# Full installation task - follows exact sequence from install.sh |
| 76 | +install = { depends-on = ["install-pytorch", "install-vllm-reqs", "install-vllm-deps", "install-vllm", "install-torchstore", "install-forge"] } |
| 77 | + |
| 78 | +# Test installation task |
| 79 | +test-install = """ |
| 80 | + python -c "import torch; print(f'PyTorch {torch.__version__} (CUDA: {torch.cuda.is_available()})')" && \ |
| 81 | + python -c "import vllm; print('vLLM imported successfully')" && \ |
| 82 | + python -c "import forge; print('forge imported successfully')" || true |
| 83 | +""" |
| 84 | + |
| 85 | +# Define environments |
| 86 | +[environments] |
| 87 | +default = { solve-group = "default" } |
| 88 | +dev = { features = ["dev"], solve-group = "default" } |
| 89 | +docs = { features = ["docs"], solve-group = "default" } |
| 90 | + |
| 91 | +[target.linux-64.activation] |
| 92 | +scripts = ["scripts/pixi_cuda_env.sh"] |
0 commit comments