Last active
November 11, 2016 18:51
-
-
Save brianv0/e2a835656a8f000f0de29a5129ac7a85 to your computer and use it in GitHub Desktop.
DESC LSST Dockerfile
This file contains hidden or 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
Build base image: | |
docker build -t lsstdesc/stack:12.1 . | |
With Options: | |
docker build --build-arg EUPS_PRODUCT={{ EUPS_PRODUCT:lsst_apps }} --build-arg EUPS_TAG={{ EUPS_TAG:v12_1 }} --build-arg EUPS_PRODUCT_VERSION={{ EUPS_PRODUCT_VERSION: }} |
This file contains hidden or 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
FROM ubuntu:16.04 | |
MAINTAINER Brian Van Klaveren <[email protected]> | |
RUN apt-get --yes update && \ | |
apt-get --yes install bash \ | |
bison \ | |
bzip2 \ | |
cmake \ | |
curl \ | |
flex \ | |
g++ \ | |
gettext \ | |
git \ | |
libbz2-dev \ | |
libglib2.0-dev \ | |
libpthread-workqueue-dev \ | |
libreadline-dev \ | |
libssl-dev \ | |
libsm6 \ | |
make \ | |
python-numpy \ | |
ncurses-dev \ | |
openjdk-8-jre-headless \ | |
openssl \ | |
patch \ | |
python-dev \ | |
python-setuptools \ | |
zlib1g-dev && \ | |
apt-get -y clean | |
ARG LSST_STACK_DIR=/lsst/stack | |
ARG LSST_USER=desc | |
ARG LSST_GROUP=desc | |
ARG LSST_WORKSPACE=/desc | |
ARG EUPS_HOME=$LSST_STACK_DIR/.eups | |
ARG EUPS_PRODUCT=lsst_apps | |
ARG EUPS_TAG=12.1 | |
ARG INSTALL_MINICONDA=Y | |
RUN mkdir -p $LSST_STACK_DIR | |
RUN mkdir -p $EUPS_HOME | |
RUN mkdir -p $LSST_WORKSPACE | |
WORKDIR $LSST_STACK_DIR | |
RUN echo "Environment: \n" && env | sort | |
# Explicitly setup user and user groups | |
RUN groupadd $LSST_GROUP | |
RUN useradd -m -g $LSST_USER $LSST_GROUP | |
RUN usermod -s /bin/bash $LSST_USER | |
# Install stack | |
# If $EUPS_TAG exists, prepend with a "-t" | |
RUN echo "Executing: eups distrib install $EUPS_TAG_OPT $EUPS_PRODUCT $EUPS_PRODUCT_VERSION" && \ | |
curl -OL https://raw.githubusercontent.com/lsst/lsst/master/scripts/newinstall.sh && \ | |
echo $INSTALL_MINICONDA | bash newinstall.sh && \ | |
/bin/bash -c 'source $LSST_STACK_DIR/loadLSST.bash; \ | |
eups distrib install ${EUPS_TAG:+"-t"} $EUPS_TAG $EUPS_PRODUCT;' | |
# Make sure $LSST_STACK_DIR and $LSST_WORKSPACE have proper permissions | |
# Fixing $LSST_STACK_DIR takes a bit of time. | |
RUN chown -R $LSST_USER:$LSST_GROUP $LSST_WORKSPACE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment