Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding julia container with AMD support #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
37 changes: 37 additions & 0 deletions applications/julia/buildjulia.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This recipe uses rocm+mpich image
# and adds rocm-enabled julia

ARG ROCM_VERSION=6.0.2
ARG BASE_IMAGE="quay.io/pawsey/rocm-mpich-base:"
#FROM quay.io/pawsey/rocm-mpich-base:rocm${ROCM_VERSION}-mpich3.4.3-ubuntu22
FROM ${BASE_IMAGE}
ARG JULIA_VERSION=1.10.2

WORKDIR /tmp/
RUN echo "Running julia installer" \
&& curl -fsSL https://install.julialang.org | sh -s -- --yes -p /opt/julia \
&& /opt/julia/bin/juliaup add ${JULIA_VERSION} \
&& /opt/julia/bin/juliaup default ${JULIA_VERSION} \
&& echo "Finished"

ENV DEBIAN_FRONTEND="noninteractive"
RUN echo "Add amd package" \
&& apt-get update -qq \
&& apt-get -y --no-install-recommends install \
rocm-libs hipcub miopen-hip \
&& apt-get clean all \
&& rm -r /var/lib/apt/lists/* \
&& echo "import Pkg; Pkg.add(\"AMDGPU\")" >> /tmp/addamdgpu.jl \
&& ls /opt/julia/bin/julia \
&& /opt/julia/bin/julia --version \
&& /opt/julia/bin/julia /tmp/addamdgpu.jl \
&& echo "Finished"

ENV PATH="$PATH:/opt/julia/bin/"
RUN mkdir -p /.singularity.d/env/
RUN echo "export PATH=$PATH:/opt/julia/bin/" >> /.singularity.d/env/91-environment.sh

# and copy the recipe into the docker recipes directory
RUN mkdir -p /opt/docker-recipes/
COPY buildjulia.dockerfile /opt/docker-recipes/

23 changes: 23 additions & 0 deletions applications/julia/buildjulianogpu.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This recipe uses rocm+mpich image
# and adds rocm-enabled julia

ARG BASE_IMAGE="quay.io/pawsey/mpich-base:3.4.3_ubuntu23.04"
FROM ${BASE_IMAGE}
ARG JULIA_VERSION=1.10.2

WORKDIR /tmp/
RUN echo "Running julia installer" \
&& curl -fsSL https://install.julialang.org | sh -s -- --yes -p /opt/julia \
&& /opt/julia/bin/juliaup add ${JULIA_VERSION} \
&& /opt/julia/bin/juliaup default ${JULIA_VERSION} \
&& echo "Finished"


ENV PATH="$PATH:/opt/julia/bin/"
RUN mkdir -p /.singularity.d/env/
RUN echo "export PATH=$PATH:/opt/julia/bin/" >> /.singularity.d/env/91-environment.sh

# and copy the recipe into the docker recipes directory
RUN mkdir -p /opt/docker-recipes/
COPY buildjulianogpu.dockerfile /opt/docker-recipes/