Commit c58cbfbb authored by Lei Wang's avatar Lei Wang Committed by LeiWang1999
Browse files

[AMD][Docker] Create Dockerfile for ROCm environment setup (#355)

* [Add] Create Dockerfile for ROCm environment setup

* Introduced a new Dockerfile for setting up a ROCm environment with PyTorch.
* Configured the working directory and installed necessary packages including Miniconda, Python, and development tools.
* Cloned the tilelang repository and executed the ROCm installation script.
* Set environment variables for compatibility and performance optimization.

* [Remove] Delete Dockerfile for ROCm environment setup

* Removed the Dockerfile used for setting up a ROCm environment with PyTorch.
* Updated README to reflect changes in Docker image naming conventions for AMD GPU support.
parent 6d44c465
FROM rocm/pytorch:rocm6.3.2_ubuntu22.04_py3.10_pytorch_release_2.4.0
WORKDIR /root
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git wget \
libgtest-dev libprotobuf-dev protobuf-compiler libgflags-dev libsqlite3-dev llvm-dev \
&& apt-get clean autoclean && rm -rf /var/lib/apt/lists/{cache,log} /tmp/* /var/tmp/*
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.5.2-0-Linux-x86_64.sh -O install_miniconda.sh && \
bash install_miniconda.sh -b -p /opt/conda && rm install_miniconda.sh
ENV PATH="/opt/conda/bin:${PATH}"
ENV LIBGL_ALWAYS_INDIRECT=1
RUN conda install pip cmake && conda install -c conda-forge libstdcxx-ng=12 && conda clean --all
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 \
&& cd tilelang && ./install_rocm.sh
CMD bash
...@@ -5,7 +5,8 @@ git clone --recursive https://github.com/tile-ai/tilelang TileLang ...@@ -5,7 +5,8 @@ git clone --recursive https://github.com/tile-ai/tilelang TileLang
cd TileLang/docker cd TileLang/docker
# build the image, this may take a while (around 10+ minutes on our test machine) # build the image, this may take a while (around 10+ minutes on our test machine)
# replace the version number cu124 with the one you want to use # replace the version number cu124 with the one you want to use
docker build -t tilelang_cuda -f Dockerfile.cu124 . # replace .cu** with .rocm for AMD GPU
docker build -t tilelang_workspace -f Dockerfile.cu124 .
# run the container # run the container
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_cuda bash 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
``` ```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment