Skip to content

Commit

Permalink
cuda docker build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
calgray committed Mar 9, 2022
1 parent 384008c commit e9a736b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion daliuge-common/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ case "$1" in
exit 0;;
"devcuda")
export VCS_TAG=`git rev-parse --abbrev-ref HEAD | tr '[:upper:]' '[:lower:]'`
echo "Building daliuge-common development version using tag ${VCS_TAG}"
echo "Building daliuge-common cuda development version using tag ${VCS_TAG}"
docker build --build-arg VCS_TAG=${VCS_TAG} --no-cache -t icrar/daliuge-common:${VCS_TAG} -f docker/Dockerfile.cuda .
echo "Build finished!"
exit 0;;
Expand Down
23 changes: 10 additions & 13 deletions daliuge-common/docker/Dockerfile.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@ FROM ubuntu:20.04
ARG BUILD_ID
LABEL stage=builder
LABEL build=$BUILD_ID
RUN apt-get update && apt-get install -y gcc python3 python3.8-venv && apt-get clean
RUN apt-get update && \
apt-get install -y gcc python3 python3.8-venv python3-pip python3-distutils libmetis-dev curl git sudo && \
apt-get clean

COPY / /daliuge

RUN cd && python3 -m venv dlg && cd /daliuge && \
. ${HOME}/dlg/bin/activate && \
pip install numpy && \
pip install . && \
apt-get remove -y gcc && \
apt-get autoremove -y


FROM ubuntu:20.04
RUN apt-get update && apt-get install -y bash
COPY --from=0 /root/dlg /root/dlg
RUN cd / && python3 -m venv dlg && cd /daliuge && \
. /dlg/bin/activate && \
pip install wheel numpy && \
pip install .

RUN apt install -y wget gnupg2 software-properties-common
RUN mkdir -p /code && cd /code &&\
Expand All @@ -35,4 +30,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
cuda-minimal-build-11-2 cuda-libraries-11-2 cuda-libraries-dev-11-2 &&\
ln -s /usr/local/cuda-11.2 /usr/local/cuda &&\
ln -s /usr/local/cuda/targets/x86_64-linux/lib /usr/local/cuda/lib &&\
ln -s /usr/local/cuda/targets/x86_64-linux/include /usr/local/cuda/include
ln -s /usr/local/cuda/targets/x86_64-linux/include /usr/local/cuda/include

# we don't clean this up, will be done in the derived images

0 comments on commit e9a736b

Please sign in to comment.