-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from ICRAR/devall-docker
Extra docker build targets
- Loading branch information
Showing
5 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# we are doing a two-stage build to keep the size of | ||
# the final image low. | ||
|
||
# First stage build and cleanup | ||
#FROM python:3.8-slim | ||
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 | ||
|
||
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 apt install -y wget gnupg2 software-properties-common | ||
RUN mkdir -p /code && cd /code &&\ | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin &&\ | ||
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 &&\ | ||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub &&\ | ||
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" &&\ | ||
apt update | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
ARG VCS_TAG | ||
# We need the base image we build with the other Dockerfile | ||
FROM icrar/daliuge-common:${VCS_TAG:-latest} | ||
|
||
# RUN sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata \ | ||
# gcc g++ gdb casacore-dev clang-tidy-10 clang-tidy libboost1.71-all-dev libgsl-dev | ||
|
||
RUN apt-get update &&\ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc python3-pip curl | ||
|
||
COPY / /daliuge | ||
RUN . /root/dlg/bin/activate && pip install wheel && cd /daliuge && \ | ||
pip install . | ||
|
||
EXPOSE 9000 | ||
EXPOSE 5555 | ||
EXPOSE 6666 | ||
EXPOSE 8000 | ||
EXPOSE 8001 | ||
EXPOSE 8002 | ||
|
||
# enable the virtualenv path from daliuge-common | ||
ENV VIRTUAL_ENV=/root/dlg | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
ENV DLG_ROOT="/tmp/dlg/var/dlg_home" | ||
|
||
RUN apt install -y git python3-dev | ||
RUN pip install 'git+https://github.com/ICRAR/dlg-nifty-components.git' | ||
RUN pip install --extra-index-url=https://artefact.skao.int/repository/pypi-internal/simple 'ska-sdp-cbf-emulator[plasma]>=1.6.4' | ||
RUN pip install 'git+https://github.com/ICRAR/dlg-casacore-components.git' | ||
|
||
CMD ["dlg", "daemon", "-vv"] |