Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright (C) 2024-2025 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

ARG CENTOS_VERSION=10
FROM quay.io/centos/centos:stream${CENTOS_VERSION}-minimal AS gosu

USER 0

ARG GOSU_VERSION=1.19
ENV GOSU_VERSION=${GOSU_VERSION}
RUN microdnf update -y && \
microdnf install -y wget && \
microdnf clean all && rm -rf /var/cache/dnf
RUN set -eux; \
rpmArch="$(rpm --query --queryformat='%{ARCH}' rpm)"; \
case "$rpmArch" in \
aarch64) dpkgArch='arm64' ;; \
armv[67]*) dpkgArch='armhf' ;; \
i[3456]86) dpkgArch='i386' ;; \
ppc64le) dpkgArch='ppc64el' ;; \
riscv64 | s390x) dpkgArch="$rpmArch" ;; \
x86_64) dpkgArch='amd64' ;; \
*) echo >&2 "error: unknown/unsupported architecture '$rpmArch'"; exit 1 ;; \
esac; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$dpkgArch"; \
chmod +x /usr/local/bin/gosu && \
rm -rf /var/cache/dnf /tmp/*

FROM quay.io/centos/centos:${CENTOS_VERSION} AS base

ARG CENTOS_VERSION
ARG PYTHON_VERSION=3.12
ARG WORKSPACE=/workspace

USER 0

COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu

# Install the EPEL repo and enable CRB
ARG EPEL_REPO=https://dl.fedoraproject.org/pub/epel/epel-release-latest-${CENTOS_VERSION}.noarch.rpm
RUN dnf -y install 'dnf-command(config-manager)' && \
dnf -y config-manager --set-enabled crb && \
dnf -y install ${EPEL_REPO} && \
/usr/bin/crb enable && \
dnf -y update

# Install base software
RUN dnf -y update && \
dnf -y install clang cmake git glibc-langpack-en libxml2-devel \
lld llvm llvm-libs libomp libomp-devel ninja-build openblas openblas-devel \
python${PYTHON_VERSION}-devel python${PYTHON_VERSION}-pip zlib-devel && \
dnf clean all && rm -rf /var/cache/dnf

# Create the /workspace directory and set permissions
WORKDIR $WORKSPACE
RUN python${PYTHON_VERSION} -m pip install uv && \
uv venv --python ${PYTHON_VERSION} --seed $WORKSPACE && \
echo "unset BASH_ENV PROMPT_COMMAND ENV" >> ${WORKSPACE}/bin/activate && \
chmod -R 777 $WORKSPACE

ENV BASH_ENV=${WORKSPACE}/bin/activate \
ENV=${WORKSPACE}/bin/activate \
LANG=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
PATH=${WORKSPACE}/bin:$PATH \
PIP_PREFIX=$WORKSPACE \
PROMPT_COMMAND=". ${WORKSPACE}/bin/activate" \
PYTHON_VERSION=$PYTHON_VERSION \
PYTHONUNBUFFERED=1 \
PYTHONPATH=${WORKSPACE}/lib/python${PYTHON_VERSION}/site-packages \
TRITON_HOME=$WORKSPACE \
CENTOS_VERSION=$CENTOS_VERSION \
UV_HTTP_TIMEOUT=60 \
WORKSPACE=$WORKSPACE \
XDG_CACHE_HOME=$WORKSPACE

COPY scripts/ldpretend.sh ${WORKSPACE}/ldpretend.sh
COPY scripts/install_software.sh ${WORKSPACE}/install_software.sh
COPY scripts/setup*.sh ${WORKSPACE}/

COPY hack/triton-gpu-check.py triton-gpu-check.py
27 changes: 27 additions & 0 deletions dockerfiles/Dockerfile.cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (C) 2024-2025 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

ARG BASE_IMAGE_NAME=base
ARG BASE_IMAGE_TAG=centos10
FROM quay.io/triton-dev-containers/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}

ENV TRITON_CPU_BACKEND=1

COPY hack/triton-gpu-check.py triton-gpu-check.py

COPY scripts/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["tail", "-f", "/dev/null"]
35 changes: 35 additions & 0 deletions dockerfiles/Dockerfile.cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2024-2025 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

ARG BASE_IMAGE_NAME=base
ARG BASE_IMAGE_TAG=centos10
FROM quay.io/triton-dev-containers/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}

ARG CUDA_VERSION=13-0

# Update and install base cuda dependencies
RUN dnf -y update && \
dnf -y install libglvnd-opengl libxkbfile \
qt5-qtwayland xcb-util-cursor && \
dnf clean all && rm -rf /var/cache/dnf

ENV CUDA_VERSION=$CUDA_VERSION

COPY examples/flash_attention_demo.ipynb flash_attention_demo.ipynb

COPY scripts/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["tail", "-f", "/dev/null"]
36 changes: 0 additions & 36 deletions dockerfiles/Dockerfile.gosu

This file was deleted.

72 changes: 0 additions & 72 deletions dockerfiles/Dockerfile.llvm

This file was deleted.

48 changes: 48 additions & 0 deletions dockerfiles/Dockerfile.rocm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (C) 2024-2025 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0


ARG BASE_IMAGE_NAME=base
ARG BASE_IMAGE_TAG=centos10
FROM quay.io/triton-dev-containers/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}

ARG ROCM_VERSION=6.4.4
ARG AMDGPU_INSTALL_URL=https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/rhel

# Install the AMD ROCm Repo and GPG key
RUN source /etc/os-release && \
if [ "$VERSION_ID" = "10.0" ]; then RHEL_VERSION=${VERSION_ID%.*}; else RHEL_VERSION=${VERSION_ID}; fi; \
AMDGPU_INSTALL_RPM=$(curl -s ${AMDGPU_INSTALL_URL}/${RHEL_VERSION}/ | grep href | sed -e 's/.*href="//' -e 's/".*//' |grep "amdgpu-install-${ROCM_VERSION%.*}.*${PLATFORM_ID#*:}.noarch.rpm") && \
dnf -y install ${AMDGPU_INSTALL_URL}/${RHEL_VERSION}/${AMDGPU_INSTALL_RPM}

# Install the ROCm rpms
RUN dnf -y install --nodocs --setopt=install_weak_deps=False \
amd-smi-lib rocminfo && \
dnf clean all && rm -rf /var/cache/yum

# Set environment variables for ROCm
ENV ROCM_VERSION=$ROCM_VERSION \
ROCM_PATH=/opt/rocm \
LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/opt/rocm/lib:/opt/rocm/llvm/lib \
PATH=/opt/rocm/bin:/opt/rocm/llvm/bin:$PATH

COPY hack/triton-gpu-check.py triton-gpu-check.py
COPY examples/triton-vector-add-rocm.py triton-vector-add-rocm.py
COPY examples/flash_attention_demo.ipynb flash_attention_demo.ipynb

COPY scripts/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["tail", "-f", "/dev/null"]
72 changes: 0 additions & 72 deletions dockerfiles/Dockerfile.triton

This file was deleted.

Loading
Loading