Skip to content

Commit 5ec0568

Browse files
committed
Introduce build workflow with pixi.
1 parent 1fc12bd commit 5ec0568

File tree

6 files changed

+3660
-3
lines changed

6 files changed

+3660
-3
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SCM syntax highlighting & preventing 3-way merges
2+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/git/
2+
3+
4+
# pixi environments
5+
.pixi
6+
*.egg-info

pixi.lock

Lines changed: 3568 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[workspace]
2+
authors = ["Hameer Abbasi <[email protected]>"]
3+
channels = ["conda-forge"]
4+
name = "pytorch-dev"
5+
platforms = ["linux-64"]
6+
version = "0.1.0"
7+
8+
[tasks]
9+
build = "./torch-build.sh"
10+
update = "./torch-update.sh"
11+
clone = "./torch-clone.sh"
12+
13+
[activation.env]
14+
PYTORCH_BUILD_DIRECTORY = "${PIXI_PROJECT_ROOT}/git"
15+
PYTORCH_PIXI_BUILD = "1"
16+
17+
[dependencies]
18+
python = "3.9.*"
19+
pip = "*"
20+
cpython = "*"
21+
gcc = "13.*"
22+
gxx = "13.*"
23+
gdb = "*"
24+
clang = "*"
25+
clangxx = "*"
26+
lldb = "*"
27+
magma = "*"
28+
cuda-driver-dev = "*"
29+
cuda-version = "12.6.*"
30+
cudnn = "*"
31+
conda-gcc-specs = "*"
32+
cuda-libraries-dev = "*"
33+
cuda-nvcc = "*"
34+
cuda-gdb = "*"
35+
cuda-nvtx-dev = "*"
36+
cuda-nvml-dev = "*"
37+
cuda-cupti-dev = "*"
38+
ccache = "*"
39+
cmake = "*"
40+
fsspec = "*"
41+
mkl = "*"
42+
mkl-include = "*"
43+
ninja = "*"
44+
packaging = "*"
45+
pyyaml = "*"
46+
scikit-build = "*"
47+
setuptools = "*"
48+
sysroot_linux-64 = ">=2.17"
49+
types-dataclasses = "*"
50+
typing = "*"
51+
typing-extensions = "*"
52+
wheel = "*"
53+
numpy = "*"
54+
expecttest = "*"
55+
hypothesis = "*"
56+
lintrunner = "*"
57+
scipy = "*"
58+
psutil = "*"
59+
pytest = "*"
60+
ghstack = "*"
61+
ipython = "*"
62+
pytest-sugar = "*"
63+
pytest-xdist = "*"
64+
filelock = "*"
65+
sympy = "*"
66+
astunparse = "*"
67+
dill = "*"
68+
jinja2 = "*"
69+
lark = "*"
70+
optree = "*"
71+
tabulate = "*"
72+
networkx = "*"
73+
zlib = "*"
74+
halide-python = "*"
75+
76+
[pypi-dependencies]
77+
z3-solver = "*"

pytorch-build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ set -e
33

44
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
55

6-
eval "$(conda shell.bash hook)"
7-
conda activate ${PYTORCH_CONDA_ENV:=pytorch-dev$PYTORCH_BUILD_SUFFIX}
6+
if ${PYTORCH_PIXI_BUILD:-0} -eq 0; then
7+
eval "$(conda shell.bash hook)"
8+
conda activate ${PYTORCH_CONDA_ENV:=pytorch-dev$PYTORCH_BUILD_SUFFIX}
9+
fi
810
cd ${PYTORCH_BUILD_DIRECTORY:=~/git$PYTORCH_BUILD_SUFFIX}/pytorch
911

1012
source $SCRIPT_DIR/torch-common.sh

torch-env.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ conda env create \
77
-f $SCRIPT_DIR/pytorch-dev.yaml \
88
-n ${PYTORCH_CONDA_ENV:=pytorch-dev$PYTORCH_BUILD_SUFFIX}
99

10-
conda activate ${PYTORCH_CONDA_ENV:=pytorch-dev${PYTORCH_BUILD_SUFFIX}}
10+
if ${PYTORCH_PIXI_BUILD:-0} -eq 0; then
11+
conda activate ${PYTORCH_CONDA_ENV:=pytorch-dev${PYTORCH_BUILD_SUFFIX}}
12+
fi
1113
echo "source $SCRIPT_DIR/torch-common.sh" > $CONDA_PREFIX/etc/conda/activate.d/activate-torch.sh
1214
echo "source $SCRIPT_DIR/deactivate-torch-common.sh" > $CONDA_PREFIX/etc/conda/activate.d/deactivate-torch.sh
1315

0 commit comments

Comments
 (0)