Skip to content

Commit 52c4c86

Browse files
authored
Compile and install triton main branch in the docker. (#7)
1 parent edf7971 commit 52c4c86

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.ci/tritonbench/install-triton-nightly.sh .ci/tritonbench/install-triton-main.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ conda create --name "${CONDA_ENV}" -y --clone "${BASE_CONDA_ENV}"
2323
conda activate "${CONDA_ENV}"
2424

2525
. "${SETUP_SCRIPT}"
26-
# Install the nightly openai/triton
27-
pip install -U --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ triton-nightly
26+
27+
# Install and build triton from source code
28+
cd /workspace
29+
git clone https://github.com/triton-lang/triton.git
30+
cd /workspace/triton
31+
pip install ninja cmake wheel pybind11; # build-time dependencies
32+
pip install -e python

docker/tritonbench-nightly.dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ ARG BASE_IMAGE=xzhao9/gcp-a100-runner-dind:latest
33

44
FROM ${BASE_IMAGE}
55

6-
ENV CONDA_ENV=tritonbench
6+
ENV CONDA_ENV=pytorch
7+
ENV CONDA_ENV_TRITON_MAIN=triton-main
78
ENV SETUP_SCRIPT=/workspace/setup_instance.sh
89
ARG TRITONBENCH_BRANCH=${TRITONBENCH_BRANCH:-main}
910
ARG FORCE_DATE=${FORCE_DATE}
@@ -49,9 +50,14 @@ RUN sudo apt update && sudo apt-get install -y libnvidia-compute-550 patchelf
4950
RUN cd /workspace/tritonbench && \
5051
bash .ci/tritonbench/install.sh
5152

53+
5254
# Test Tritonbench
5355
RUN cd /workspace/tritonbench && \
5456
bash .ci/tritonbench/test-install.sh
5557

5658
# Remove NVIDIA driver library - they are supposed to be mapped at runtime
5759
RUN sudo apt-get purge -y libnvidia-compute-550
60+
61+
# Clone the pytorch env as triton-main env, then compile triton main from source
62+
RUN cd /workspace/tritonbench && \
63+
BASE_CONDA_ENV=${CONDA_ENV} CONDA_ENV=${CONDA_ENV_TRITON_MAIN} bash .ci/tritonbench/install-triton-main.sh

0 commit comments

Comments
 (0)