Skip to content
Merged
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
8 changes: 5 additions & 3 deletions docker/Dockerfile.rocm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ RUN conda run -n py_3.10 conda install pip cmake -y && \
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev

RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main tilelang && \
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The compiler_compat workaround lacks inline documentation. Consider adding a comment explaining why this directory needs to be moved/renamed to fix the glibc/conda linker mismatch issue. This will help future maintainers understand the purpose of this non-obvious operation.

Suggested change
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main tilelang && \
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main tilelang && \
# Workaround for glibc/conda linker mismatch: renaming/removing compiler_compat prevents Conda from using its own libstdc++/libgcc, which can cause linker errors with system glibc.

Copilot uses AI. Check for mistakes.
conda run -n py_3.10 bash -c "cd tilelang && USE_ROCM=1 pip install -e . -v"
mv /opt/conda/envs/py_3.10/compiler_compat /opt/conda/envs/py_3.10/compiler_compat.bak || true && \
conda run -n py_3.10 bash -c "pip install 'numpy<2.0' --force-reinstall && cd tilelang && USE_ROCM=1 pip install -e . -v"
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The numpy version constraint 'numpy<2.0' is too broad and may lead to inconsistent builds over time. Consider pinning to a more specific version range (e.g., 'numpy>=1.24,<2.0') to ensure reproducible builds and avoid potential compatibility issues with different 1.x versions.

Suggested change
conda run -n py_3.10 bash -c "pip install 'numpy<2.0' --force-reinstall && cd tilelang && USE_ROCM=1 pip install -e . -v"
conda run -n py_3.10 bash -c "pip install 'numpy>=1.24,<2.0' --force-reinstall && cd tilelang && USE_ROCM=1 pip install -e . -v"

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +26
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

This line combines multiple unrelated operations (git clone, compiler_compat workaround, numpy installation, and tilelang installation) into a single RUN command. Consider splitting this into separate RUN commands for better readability, easier debugging, and clearer Docker layer caching. For example:

RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main tilelang

RUN mv /opt/conda/envs/py_3.10/compiler_compat /opt/conda/envs/py_3.10/compiler_compat.bak || true

RUN conda run -n py_3.10 bash -c "pip install 'numpy<2.0' --force-reinstall"

RUN conda run -n py_3.10 bash -c "cd tilelang && USE_ROCM=1 pip install -e . -v"

Copilot uses AI. Check for mistakes.

RUN conda init bash
RUN conda init bash && \
echo "conda activate py_3.10" >> /root/.bashrc

SHELL ["/bin/bash", "-l", "-c"]

CMD ["bash", "-c", "source ~/.bashrc && conda activate py_3.10 && exec bash"]
ENTRYPOINT ["/bin/bash", "--login", "-i"]
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

Using ENTRYPOINT ["/bin/bash", "--login", "-i"] makes it difficult to override the container's command and may cause issues with non-interactive use cases (e.g., CI/CD, docker exec). The -i flag is particularly problematic as it forces interactive mode even when no TTY is attached. Consider using CMD ["bash"] like the other Dockerfiles in this repository (e.g., Dockerfile.cu126, Dockerfile.cu128), or if ENTRYPOINT is needed, use ENTRYPOINT ["/bin/bash", "-c"] with a CMD for flexibility.

Suggested change
ENTRYPOINT ["/bin/bash", "--login", "-i"]
CMD ["bash"]

Copilot uses AI. Check for mistakes.
Loading