Skip to content

Commit

Permalink
Compile and install triton main branch in the docker. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 authored Oct 17, 2024
1 parent edf7971 commit 52c4c86
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ conda create --name "${CONDA_ENV}" -y --clone "${BASE_CONDA_ENV}"
conda activate "${CONDA_ENV}"

. "${SETUP_SCRIPT}"
# Install the nightly openai/triton
pip install -U --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ triton-nightly

# Install and build triton from source code
cd /workspace
git clone https://github.com/triton-lang/triton.git
cd /workspace/triton
pip install ninja cmake wheel pybind11; # build-time dependencies
pip install -e python
8 changes: 7 additions & 1 deletion docker/tritonbench-nightly.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ARG BASE_IMAGE=xzhao9/gcp-a100-runner-dind:latest

FROM ${BASE_IMAGE}

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


# Test Tritonbench
RUN cd /workspace/tritonbench && \
bash .ci/tritonbench/test-install.sh

# Remove NVIDIA driver library - they are supposed to be mapped at runtime
RUN sudo apt-get purge -y libnvidia-compute-550

# Clone the pytorch env as triton-main env, then compile triton main from source
RUN cd /workspace/tritonbench && \
BASE_CONDA_ENV=${CONDA_ENV} CONDA_ENV=${CONDA_ENV_TRITON_MAIN} bash .ci/tritonbench/install-triton-main.sh

0 comments on commit 52c4c86

Please sign in to comment.