diff --git a/C2/Dockerfile b/C2/Dockerfile deleted file mode 100644 index c8dd1333..00000000 --- a/C2/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ - -############################################################ -# Dockerfile to build base for CRISPRessoWeb -############################################################ - -# Set the base image to anaconda python 2.7 -FROM continuumio/miniconda:4.7.10 - -# File Author / Maintainer -MAINTAINER Kendell Clement - -ENV SHELL bash - - -#Add build tools -RUN apt-get update && apt-get install build-essential gcc zip unzip tmpreaper ssl-cert cron \ - apache2 libapache2-mod-wsgi apache2-dev \ - -y --no-install-recommends \ - && apt-get clean \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN conda config --add channels defaults \ - && conda config --add channels conda-forge \ - && conda config --add channels bioconda \ - && conda config --set remote_connect_timeout_secs 60 \ - && conda config --set ssl_verify no \ - && conda install -c main rabbitmq-server flask matplotlib celery flask-mail flask-wtf flask-sqlalchemy flask-login flask-admin werkzeug vine=1.3.0 email_validator \ - && conda install -c bioconda trimmomatic flash \ - && conda clean -ay - - -RUN pip install mod_wsgi \ - && mod_wsgi-express module-config > /etc/apache2/mods-available/wsgi.load - -#install ms fonts -RUN echo "deb http://httpredir.debian.org/debian jessie main contrib" > /etc/apt/sources.list \ - && echo "deb http://security.debian.org/ jessie/updates main contrib" >> /etc/apt/sources.list \ - && echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections \ - && apt-get update \ - && apt-get install -y ttf-mscorefonts-installer \ - && apt-get clean \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -#install flower -#RUN conda install flower \ -# && conda clean -ay - -ENV C_FORCE_ROOT "true" diff --git a/Dockerfile b/Dockerfile index e93684ef..95cc0708 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,50 +4,100 @@ # Set the base image to anaconda python 2.7 #FROM kclem/c2wbase:1.1 -FROM c2wbase:1.2 +FROM mambaorg/micromamba:0.13.1 # File Author / Maintainer MAINTAINER Kendell Clement ENV SHELL bash -#install CRISPResso + +# Install dependencies +ENV DEBIAN_FRONTEND=noninteractive +RUN echo "deb http://http.us.debian.org/debian buster main contrib" >> /etc/apt/sources.list && \ + echo "deb http://security.debian.org buster/updates main contrib" >> /etc/apt/sources.list && \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + apache2 \ + apache2-dev \ + build-essential \ + cron \ + gcc \ + libapache2-mod-wsgi \ + rabbitmq-server \ + ssl-cert \ + ttf-mscorefonts-installer \ + tmpreaper \ + unzip \ + wget \ + zip && \ + apt-get clean && \ + apt-get autoremove -y && \ + rm -rf /var/lib/apt/lists/* + +# Install Micromamba +RUN micromamba install -y -n base \ + bowtie2 \ + celery=4.4.6 \ + cython \ + email_validator \ + flask \ + flask-admin \ + flask-mail \ + flask-wtf \ + flask-sqlalchemy \ + flask-login \ + flash \ + numpy \ + python=3.8 \ + pip \ + samtools \ + sqlalchemy=1.3.23 \ + trimmomatic \ + werkzeug \ + vine \ + -c bioconda \ + -c conda-forge && \ + micromamba clean --all --yes && \ + pip install mod_wsgi && \ + mod_wsgi-express module-config > /etc/apache2/mods-available/wsgi.load + +# Install CRISPResso ARG crispresso_version='2.1.0' WORKDIR /tmp/CRISPResso2 -RUN wget https://github.com/pinellolab/CRISPResso2/archive/v${crispresso_version}.zip \ - && unzip v${crispresso_version}.zip \ - && cd /tmp/CRISPResso2/CRISPResso2-${crispresso_version} \ - && python setup.py install \ - && CRISPResso -h \ - && rm -rf /tmp/CRISPResso2 +# RUN wget https://github.com/pinellolab/CRISPResso2/archive/v${crispresso_version}.zip \ + # && unzip v${crispresso_version}.zip \ +COPY ./CRISPResso2 /tmp/CRISPResso2 +RUN cd /tmp/CRISPResso2/ && \ + python setup.py install && \ + CRISPResso -h && \ + rm -rf /tmp/CRISPResso2 #install flower -#RUN conda install flower \ -# && conda clean -ay +#RUN micromamba install flower \ +# && micromamba clean -ay ENV C_FORCE_ROOT "true" #install CRISPRessoWEB WORKDIR /var/www/webapps/CRISPRessoWEB -RUN mkdir -p /var/www/CRISPResso_TMP/UPLOADS \ - && mkdir -p /var/www/CRISPResso_TMP/REPORTS \ - && mkdir -p /var/www/CRISPResso_TMP/DATA \ - && mkdir -p /var/www/CRISPResso_TMP/SERVER \ - && chmod -R 777 /var/www/CRISPResso_TMP +RUN mkdir -p /var/www/CRISPResso_TMP/UPLOADS && \ + mkdir -p /var/www/CRISPResso_TMP/REPORTS && \ + mkdir -p /var/www/CRISPResso_TMP/DATA && \ + mkdir -p /var/www/CRISPResso_TMP/SERVER && \ + chmod -R 777 /var/www/CRISPResso_TMP COPY . /var/www/webapps/CRISPRessoWEB #RUN crontab add_to_crontab -RUN cp conf_files/apache/httpd-vhosts.conf /etc/apache2/sites-available/crispresso.conf \ - && cp conf_files/celery_daemon/celeryd /etc/init.d/ && chmod +x /etc/init.d/celeryd \ - && chmod -R 755 /var/www/webapps/CRISPRessoWEB -RUN a2ensite crispresso \ - && a2dissite 000-default +RUN cp conf_files/apache/httpd-vhosts.conf /etc/apache2/sites-available/crispresso.conf && \ + cp conf_files/celery_daemon/celeryd /etc/init.d/ && chmod +x /etc/init.d/celeryd && \ + chmod -R 755 /var/www/webapps/CRISPRessoWEB +RUN a2ensite crispresso && \ + a2dissite 000-default #recreate demo files # WORKDIR /var/www/webapps/CRISPRessoWEB/CRISPRessoWEB/static/demo # RUN run.sh - - EXPOSE 80 #flower port (activate flower in start_server_docker.sh)