diff --git a/build_all.sh b/build_all.sh index c9aa391..cee5da7 100755 --- a/build_all.sh +++ b/build_all.sh @@ -2,6 +2,7 @@ ROCM_VERSION=5.1.3 AMDGPU_VERSION=22.10.3 cp -r scripts rocm-terminal cp -r scripts dev +cp -r scripts rocm-opencl-runtime # build rocm-terminal cd rocm-terminal/ @@ -27,3 +28,8 @@ sudo docker build . -f Dockerfile-ubuntu-18.04-complete -t rocm/dev-ubuntu-18.04 #ubuntu20.04 complete sudo docker build . -f Dockerfile-ubuntu-20.04-complete -t rocm/dev-ubuntu-20.04:$ROCM_VERSION-complete --build-arg=ROCM_VERSION=$ROCM_VERSION --build-arg=AMDGPU_VERSION=$AMDGPU_VERSION + +# build rocm-opencl-runtime +cd ../rocm-opencl-runtime +sudo docker build . -f Dockerfile -t rocm/rocm-opencl-runtime:$ROCM_VERSION --build-arg=ROCM_VERSION=$ROCM_VERSION --build-arg=AMDGPU_VERSION=$AMDGPU_VERSION +sudo docker tag rocm/rocm-opencl-runtime:$ROCM_VERSION rocm/rocm-opencl-runtime:latest diff --git a/push_all.sh b/push_all.sh index 3c5c202..b893d5e 100755 --- a/push_all.sh +++ b/push_all.sh @@ -16,4 +16,7 @@ sudo docker push rocm/dev-ubuntu-20.04:$ROCM_VERSION-complete sudo docker push rocm/dev-centos-7:latest sudo docker push rocm/dev-ubuntu-20.04:latest sudo docker push rocm/dev-ubuntu-18.04:latest -sudo docker push rocm/rocm-terminal:latest \ No newline at end of file +sudo docker push rocm/rocm-terminal:latest + +sudo docker push rocm/rocm-opencl-runtime:$ROCM_VERSION +sudo docker push rocm/rocm-opencl-runtime:latest diff --git a/rocm-opencl-runtime/Dockerfile-ubuntu-18.04 b/rocm-opencl-runtime/Dockerfile-ubuntu-18.04 new file mode 100644 index 0000000..dbfbcc2 --- /dev/null +++ b/rocm-opencl-runtime/Dockerfile-ubuntu-18.04 @@ -0,0 +1,18 @@ +# This dockerfile is meant to serve as a rocm base image. It registers the debian rocm package repository, and +# installs the rocm-dev package. + +FROM ubuntu:18.04 +LABEL maintainer=peng.sun@amd.com + +# Register the ROCM package repository, and install rocm-dev package +ARG ROCM_VERSION=5.1.3 +ARG AMDGPU_VERSION=22.10.3 + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl libnuma-dev gnupg \ + && curl -sL https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \ + && printf "deb [arch=amd64] https://repo.radeon.com/rocm/apt/$ROCM_VERSION/ ubuntu main" | tee /etc/apt/sources.list.d/rocm.list \ + && printf "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu focal main" | tee /etc/apt/sources.list.d/amdgpu.list \ + && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + rocm-opencl-runtime && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* diff --git a/rocm-opencl-runtime/Dockerfile-ubuntu-20.04 b/rocm-opencl-runtime/Dockerfile-ubuntu-20.04 new file mode 100644 index 0000000..5f20110 --- /dev/null +++ b/rocm-opencl-runtime/Dockerfile-ubuntu-20.04 @@ -0,0 +1,19 @@ +# This dockerfile is meant to serve as a rocm base image. It registers the debian rocm package repository, and +# installs the rocm-dev package. + +FROM ubuntu:20.04 +LABEL maintainer=peng.sun@amd.com + +# Register the ROCM package repository, and install rocm-dev package +ARG ROCM_VERSION=5.1.3 +ARG AMDGPU_VERSION=22.10.3 + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl libnuma-dev gnupg \ + && curl -sL https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \ + && printf "deb [arch=amd64] https://repo.radeon.com/rocm/apt/$ROCM_VERSION/ ubuntu main" | tee /etc/apt/sources.list.d/rocm.list \ + && printf "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu focal main" | tee /etc/apt/sources.list.d/amdgpu.list \ + && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + rocm-opencl-runtime && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* +RUN groupadd -g 109 render