diff --git a/daliuge-common/build_common.sh b/daliuge-common/build_common.sh index 077fbb908..ab613541d 100755 --- a/daliuge-common/build_common.sh +++ b/daliuge-common/build_common.sh @@ -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;; diff --git a/daliuge-common/docker/Dockerfile.cuda b/daliuge-common/docker/Dockerfile.cuda index cd93affac..6ff772ba9 100644 --- a/daliuge-common/docker/Dockerfile.cuda +++ b/daliuge-common/docker/Dockerfile.cuda @@ -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 &&\ @@ -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 \ No newline at end of file + 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 \ No newline at end of file