Skip to content

Commit cc6bf6b

Browse files
HamerlateUbuntu
authored andcommitted
Fix amd docker issues. (tile-ai#503)
Co-authored-by: Ubuntu <srguser@srgmi300c.ibcr0fi0qgdu5pqgbnhfbyasxg.parx.internal.cloudapp.net>
1 parent f4e0f8e commit cc6bf6b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

docker/Dockerfile.rocm

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1111
libgtest-dev libprotobuf-dev protobuf-compiler libgflags-dev libsqlite3-dev llvm-dev \
1212
&& apt-get clean autoclean && rm -rf /var/lib/apt/lists/{cache,log} /tmp/* /var/tmp/*
1313

14-
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.5.2-0-Linux-x86_64.sh -O install_miniconda.sh && \
15-
bash install_miniconda.sh -b -p /opt/conda && rm install_miniconda.sh
16-
1714
ENV PATH="/opt/conda/bin:${PATH}"
18-
1915
ENV LIBGL_ALWAYS_INDIRECT=1
2016

21-
RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && conda clean --all
17+
18+
RUN conda run -n py_3.10 conda install pip cmake -y && \
19+
conda run -n py_3.10 conda install -c conda-forge libstdcxx-ng=12 -y && \
20+
conda clean --all
2221

2322
RUN apt-get install -y python3 python3-dev python3-setuptools gcc libtinfo-dev zlib1g-dev build-essential cmake libedit-dev libxml2-dev
2423

25-
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main tilelang \
26-
&& cd tilelang && ./install_rocm.sh
24+
RUN git clone https://github.com/tile-ai/tilelang.git --recursive -b main tilelang && \
25+
conda run -n py_3.10 bash -c "cd tilelang && ./install_rocm.sh"
26+
27+
RUN conda init bash
28+
29+
SHELL ["/bin/bash", "-l", "-c"]
2730

28-
CMD bash
31+
CMD ["bash", "-c", "source ~/.bashrc && conda activate py_3.10 && exec bash"]

docker/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ cd TileLang/docker
88
# replace .cu** with .rocm for AMD GPU
99
docker build -t tilelang_workspace -f Dockerfile.cu124 .
1010
# run the container
11+
# if it's nvidia
1112
docker run -it --cap-add=SYS_ADMIN --network=host --gpus all --cap-add=SYS_PTRACE --shm-size=4G --security-opt seccomp=unconfined --security-opt apparmor=unconfined --name tilelang_test tilelang_workspace bash
13+
# if it's amd
14+
docker run -it --cap-add=SYS_ADMIN --network=host --device=/dev/kfd --device=/dev/dri --cap-add=SYS_PTRACE --shm-size=4G --security-opt seccomp=unconfined --security-opt apparmor=unconfined --name tilelang_test tilelang_workspace bash
1215
```

0 commit comments

Comments
 (0)