Skip to content
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
93 changes: 93 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Start with Ubuntu base image
FROM ubuntu:16.04

MAINTAINER AstroVPK <vishal.kasliwal@gmail.com>

# For SSH access and port redirection
ENV ROOTPASSWORD sample

# Turn off prompts during installations
ENV DEBIAN_FRONTEND noninteractive
RUN echo "debconf shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
RUN echo "debconf shared/accepted-oracle-license-v1-1 seen true" | debconf-set-selections

# Update packages
RUN apt-get -y update

# Install system tools / libraries
RUN apt-get -y install python3-software-properties \
software-properties-common \
bzip2 \
ssh \
net-tools \
vim \
curl \
expect \
git \
nano \
wget \
build-essential \
dialog \
make \
build-essential \
checkinstall \
bridge-utils \
virt-viewer \
python-pip \
python-setuptools \
python-dev \
g++ \
cmake \
man \
gfortran \
cpio

# Install MKL
WORKDIR /tmp
RUN wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15816/l_mkl_2019.5.281_online.tgz
RUN tar -xzf l_mkl_2019.5.281_online.tgz
WORKDIR /tmp/l_mkl_2019.5.281_online
RUN sed -i 's/ACCEPT_EULA=decline/ACCEPT_EULA=accept/g' silent.cfg && \
sed -i 's/ACTIVATION_TYPE=exist_lic/ACTIVATION_TYPE=trial_lic/g' silent.cfg && \
./install.sh -s silent.cfg && \
# Clean up
cd .. && rm -rf *

# CONDA
WORKDIR /tmp
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda2-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
ENV PATH=/opt/conda/bin:$PATH \
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
LANG=C.UTF-8

# NLOPT
RUN wget https://github.com/stevengj/nlopt/archive/v2.6.1.tar.gz -O nlopt.tar.gz
RUN tar -xvzf nlopt.tar.gz && cd nlopt-2.6.1/ && cmake . && make && make install && ldconfig && cd ..

# Kali Requirements
RUN conda install cython future pytest numpy matplotlib scipy jupyter
RUN pip install gatspy multi_key_dict fitsio==0.9.8 acor brewer2mpl sklearn zmq psutil astropy

# Install kali
WORKDIR /home/kali
COPY . .
RUN COMPILERVARS_ARCHITECTURE=intel64 . /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh && \
. /opt/intel/mkl/bin/mklvars.sh intel64 && python setup.py build_ext

RUN apt-get install dos2unix
RUN dos2unix /home/kali/bin/setup.sh # for those windows users

# Final Setup
SHELL ["/bin/bash", "-c"]
RUN echo "source /home/kali/bin/setup.sh" >> ~/.bashrc
RUN echo "DISPLAY=:0.0" >> ~/.bashrc

ENTRYPOINT ["/bin/bash", "--login", "-ic"]
CMD bash
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Version: 2.0.0

Install
-------
# Docker installation

The easiest way to install is with docker. However, this does not currently include `carma_pack`.

1. git clone https://github.com/AstroVPK/kali.git
2. `docker build -t kali .`
3. [optional: run tests] `docker run -it --rm kali-astrovpk "pytest tests/"`
3. For jupyter `docker run -it -e DISPLAY=:0.0 --rm -p 8888:8888 kali "jupyter notebook --no-browser --ip=0.0.0.0 --port=8888 --allow-root"`
4. For bash `docker run -it -e DISPLAY=:0.0 --rm -p 8888:8888 kali`


# Direct installation
Install instructions are provided for Linux & Mac OSX machines. The following OSs have been tested


Expand Down