Skip to content

Commit

Permalink
changed based image template to avoid cfg issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lzy7071 committed Jun 24, 2019
1 parent 4c56cc9 commit 44b426b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 76 deletions.
58 changes: 26 additions & 32 deletions wc_env_manager/assets/base_image/Dockerfile.template
Expand Up @@ -101,20 +101,33 @@ RUN apt-get update -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

# Java
{% if java_install -%}
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
default-jre \
&& rm -rf /var/lib/apt/lists/*
{%- endif %}

# Node
{% if npm_install -%}
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/
{%- endif %}

# curl
{% if curl_install -%}
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/
{%- endif %}

# install PostgreSQL client
{% if postgresql_client_install -%}
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
gnupg \
Expand All @@ -131,8 +144,10 @@ RUN apt-get update -y \
wget \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
{%- endif %}

# install openbabel
{% if openbabel_install -%}
ARG openbabel_version=2.4.1
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -171,8 +186,11 @@ RUN apt-get update -y \
zlib1g-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
{%- endif %}

# install ChemAxon Marvin

{% if marvin_install -%}
ARG marvin_version=19.7
COPY marvin_linux_${marvin_version}.deb /tmp/
RUN apt-get update -y \
Expand All @@ -187,23 +205,9 @@ RUN apt-get update -y \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/default-java \
CLASSPATH=$CLASSPATH:/opt/chemaxon/marvinsuite/lib/MarvinBeans.jar
{%- endif %}


# Docker
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" \
\
&& apt-get update -y \
&& apt-get install -y --no-install-recommends docker-ce \
&& rm -rf /var/lib/apt/lists/*

# Install Python packages; pbr has to be installed first to workaround error in sphinxcontrib-spelling installation
COPY requirements.txt /tmp/
Expand All @@ -228,36 +232,26 @@ RUN apt-get update -y \
six \
&& pip${python_version_major_minor} install -U git+https://github.com/jjhelmus/CyLP.git@py3#egg=cylp \
&& pip${python_version_major_minor} install -r /tmp/requirements.txt \
&& rm tmp/requirements.txt \
\
&& apt-get remove -y \
build-essential \
swig \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
&& rm tmp/requirements.txt

# Install NCBI taxonomy database and ETE3 package
RUN pip${python_version_major_minor} install ete3 \
&& python${python_version_major_minor} -c "import ete3; ete3.NCBITaxa().get_descendant_taxa('Homo');" \
&& rm /taxdump.tar.gz

# Save image tag to file so it is accessible from within containers
ARG image_tag='0.2'
ARG image_tag={{ image_tag }}
RUN echo ${image_tag} > /etc/docker-image-tag

# install debugging utilities
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
nano \
postgresql \
snapd \
&& snap install pycharm-community --classic \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y --no-install-recommends \
nano

# cleanup
RUN apt-get remove -y \
build-essential \
cmake
build-essential \
cmake

# final command
WORKDIR /root
Expand Down
59 changes: 15 additions & 44 deletions wc_env_manager/config/core.default.cfg
@@ -1,9 +1,9 @@
[wc_env_manager]
# other options
verbose = False
verbose = True

[[base_image]]
repo_unsquashed = ''
repo_unsquashed = lzy7071/karrlabdatanator_dependencies_unsquashed
repo = lzy7071/karrlabdatanator_dependencies
tags = 'latest', '0.2'
dockerfile_template_path = ${ROOT}/assets/base_image/Dockerfile.template
Expand All @@ -13,8 +13,8 @@
timezone = America/New_York

# docker
docker_install = ''
circleci_install = ''
# docker_install = False
# circleci_install = False

# Python
python_version = 3.6.8
Expand All @@ -29,57 +29,34 @@
curl_install = True

# databases
postgresql_client_install = ''
# postgresql_client_install = False

# optimization solvers
cbc_version = 2.8.5 # latest version compatible with CyLP
cbc_install = ''
coin_utils_version = 2.10.14
coin_utils_install = ''
cplex_version = 12.8.0
cplex_install = ''
gurobi_version = 8.1.0
gurobi_license = ''
gurobi_install = False
marvin_version = 19.7
marvin_install = True
minos_version = 5.6
minos_install = ''
mosek_version = 8.1.0.78
mosek_install = False
mosek_license = ''
qpoases_version = 3.2.1
qpoases_install = ''
soplex_version = 3.1.1 # newer version not yet supported by soplex_cython
soplex_install = ''
xpress_version = 8.5.6
xpress_install = ''
xpress_license = ''
xpress_license_server = ''


# ODE solvers
sundials_install = ''
sundials_version = 3.2.1
# sundials_install = False
# sundials_version = 3.2.1

# chemoinformatics tools
openbabel_version = 2.4.1
openbabel_install = True

# bioinformatics tools
kallisto_version = 0.45.1
kallisto_install = ''
# kallisto_version = 0.45.1
# kallisto_install = False

[[image]]
repo = lzy7071/karrlabdatanator_dependencies
repo = lzy7071/karrlabdatanator
tags = 'latest', '0.2'
dockerfile_template_path = ${ROOT}/assets/image/Dockerfile.template
config_path = ${HOME}/.wc/
ssh_key_path = /root/.ssh/id_rsa
python_version = 3.6
python_packages = '''
# development tools
# ipython
# jupyter
ipython
jupyter
# static analysis
pylint
Expand Down Expand Up @@ -139,15 +116,9 @@
POSTGRES_USER = postgres

[[container]]
name_format = wc_env-%Y-%m-%d-%H-%M-%S
name_format = datanator-%Y-%m-%d-%H-%M-%S
python_packages = ''
setup_script = '''
if [ -x "$$(command -v datanator)" ]; then
datanator db create
datanator db migrate
datanator db restore --restore-schema --do-not-exit-on-error
fi
'''
setup_script = ''

[[docker_hub]]
# username = None
Expand Down

0 comments on commit 44b426b

Please sign in to comment.