Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/release-ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Build and push ${{ matrix.cuda }} ${{ matrix.arch }} image
uses: docker/build-push-action@v5
with:
context: docker
context: .
file: docker/Dockerfile.${{ matrix.cuda }}
platforms: linux/${{ matrix.arch }}
push: ${{ github.event_name != 'pull_request' }}
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu126
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \
wget

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /opt/conda py312

# Set home directory
Expand All @@ -20,7 +20,8 @@ ENV PATH="/opt/conda/bin:$PATH"
ENV PATH="/opt/conda/envs/py312/bin:$PATH"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
RUN bash /install/install_python_packages.sh cu126

# Install mpi4py in the conda environment
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu126.dev
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ USER $USERNAME
WORKDIR /home/$USERNAME

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /home/$USERNAME/conda py312

RUN echo "source activate py312" >> ~/.bashrc
ENV PATH="/home/$USERNAME/conda/bin:$PATH"
ENV PATH="/home/$USERNAME/conda/envs/py312/bin:$PATH"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
RUN bash /install/install_python_packages.sh cu126 && pip3 install pre-commit

# Install mpi4py in the conda environment
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu128
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \
wget

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /opt/conda py312

# Set home directory
Expand All @@ -20,7 +20,8 @@ ENV PATH="/opt/conda/bin:$PATH"
ENV PATH="/opt/conda/envs/py312/bin:$PATH"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
RUN bash /install/install_python_packages.sh cu128

# Install mpi4py in the conda environment
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu128.dev
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ USER $USERNAME
WORKDIR /home/$USERNAME

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /home/$USERNAME/conda py312

RUN echo "source activate py312" >> ~/.bashrc
ENV PATH="/home/$USERNAME/conda/bin:$PATH"
ENV PATH="/home/$USERNAME/conda/envs/py312/bin:$PATH"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
RUN bash /install/install_python_packages.sh cu128 && pip3 install pre-commit

# Install mpi4py in the conda environment
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu129
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \
wget

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /opt/conda py312

# Set home directory
Expand All @@ -23,7 +23,8 @@ ENV PATH="/opt/conda/envs/py312/bin:$PATH"
ENV TRITON_PTXAS_PATH="/usr/local/cuda/bin/ptxas"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
RUN bash /install/install_python_packages.sh cu129

# Install mpi4py in the conda environment
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu129.dev
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ USER $USERNAME
WORKDIR /home/$USERNAME

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /home/$USERNAME/conda py312

RUN echo "source activate py312" >> ~/.bashrc
ENV PATH="/home/$USERNAME/conda/bin:$PATH"
ENV PATH="/home/$USERNAME/conda/envs/py312/bin:$PATH"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
RUN bash /install/install_python_packages.sh cu129 && pip3 install pre-commit

# Install mpi4py in the conda environment
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu130
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \
wget

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /opt/conda py312

# Set home directory
Expand All @@ -23,7 +23,8 @@ ENV PATH="/opt/conda/envs/py312/bin:$PATH"
ENV TRITON_PTXAS_PATH="/usr/local/cuda/bin/ptxas"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
# use nightly/cu130 temporarily and change to cu130 when torch releases stable version
RUN bash /install/install_python_packages.sh nightly/cu130

Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile.cu130.dev
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ USER $USERNAME
WORKDIR /home/$USERNAME

# Install python
COPY install/install_python.sh /install/install_python.sh
COPY docker/install/install_python.sh /install/install_python.sh
RUN bash /install/install_python.sh /home/$USERNAME/conda py312

RUN echo "source activate py312" >> ~/.bashrc
ENV PATH="/home/$USERNAME/conda/bin:$PATH"
ENV PATH="/home/$USERNAME/conda/envs/py312/bin:$PATH"

# Install torch and other python packages
COPY install/install_python_packages.sh /install/install_python_packages.sh
COPY requirements.txt /install/requirements.txt
COPY docker/install/install_python_packages.sh /install/install_python_packages.sh
# use nightly/cu130 temporarily and change to cu130 when torch releases stable version
RUN bash /install/install_python_packages.sh nightly/cu130 && pip3 install pre-commit

Expand Down
7 changes: 2 additions & 5 deletions docker/install/install_python_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ set -u
CUDA_VERSION=${1:-cu128}

pip3 install torch --index-url https://download.pytorch.org/whl/${CUDA_VERSION}
pip3 install requests responses ninja pytest numpy scipy build nvidia-ml-py cuda-python einops nvidia-nvshmem-cu12
pip3 install click
pip3 install 'apache-tvm-ffi==0.1.0b15'
pip3 install nvidia-cutlass-dsl
pip3 install 'nvidia-cudnn-frontend>=1.13.0'
pip3 install -r /install/requirements.txt
pip3 install responses pytest scipy build cuda-python nvidia-nvshmem-cu12

# Install cudnn package based on CUDA version
if [[ "$CUDA_VERSION" == *"cu13"* ]]; then
Expand Down
13 changes: 13 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apache-tvm-ffi==0.1.0b15
click
einops
ninja
numpy
nvidia-cudnn-frontend>=1.13.0
nvidia-cutlass-dsl>=4.2.1
nvidia-ml-py
packaging>=24.2
requests
tabulate
torch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

torch is installed separately in docker/install/install_python_packages.sh using a specific index URL based on the CUDA version. Including it in requirements.txt is redundant and can lead to version conflicts or incorrect installations. For users installing via setup.py, it's standard practice to expect them to have torch pre-installed according to their specific hardware and CUDA setup. Please remove torch from this file.

tqdm
30 changes: 15 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ def generate_build_meta() -> None:

ext_modules: List[setuptools.Extension] = []
cmdclass: Mapping[str, type[setuptools.Command]] = {}
install_requires = [
"numpy",
"torch",
"ninja",
"requests",
"nvidia-ml-py",
"einops",
"click",
"tqdm",
"tabulate",
"apache-tvm-ffi==0.1.0b15",
"packaging>=24.2",
"nvidia-cudnn-frontend>=1.13.0",
"nvidia-cutlass-dsl>=4.2.1",
]


def get_install_requires() -> List[str]:
"""Read install requirements from requirements.txt."""
requirements_file = root / "requirements.txt"
if not requirements_file.exists():
return []
Comment on lines +49 to +50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Silently returning an empty list when requirements.txt is missing can lead to a successful installation with missing dependencies, which will cause hard-to-debug runtime errors. It's better to let the build fail fast if requirements.txt is not found. Removing this check will allow path.read_text() to raise a FileNotFoundError, which is the desired behavior.

return [
line.strip()
for line in requirements_file.read_text().splitlines()
if line.strip() and not line.strip().startswith("#")
]


install_requires = get_install_requires()
generate_build_meta()


Expand Down