Skip to content

Commit

Permalink
Merge pull request #294 from sanger-pathogens/docker_branch
Browse files Browse the repository at this point in the history
Add a docker file, build and documentation updates. Fix for issue 293.
  • Loading branch information
kpepper authored Aug 7, 2019
2 parents 07abf2c + 42555c9 commit 66317a6
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ maven.properties
.evosuite
maven-archiver
.dribble.*
.Dockerfile*
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
sudo: true
matrix:
include:
- jdk: oraclejdk9
- jdk: oraclejdk12
env:
- TEST_EXCLUDES="**/*_ESTest*"
- jdk: openjdk9
Expand All @@ -19,10 +19,11 @@ cache:
directories:
- "${HOME}/dependencies"
- "${HOME}/.m2"
services:
- xvfb
before_install:
- "export CASHER_TIME_OUT=300"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "source install_dependencies.sh"
- mvn validate
install:
Expand All @@ -32,4 +33,4 @@ script:
cd test;
ln -s $(pwd)/../etc/log4j.properties .;
./RunTravisTests.sh -e "$TEST_EXCLUDES" | tee test.log && [ -z "$(grep 'Failures:\s[^0]\|Errors:\s[^0]' test.log)" ];
fi
fi
83 changes: 83 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
##############################################################
# Experimental Docker file for the Artemis software suite.
#
# Please see usage documentation at Docker Hub:
#
# https://hub.docker.com/r/sangerpathogens/artemis
#
##############################################################
FROM ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive

LABEL maintainer="path-help@sanger.ac.uk"

# Build and environment configuration
ARG ARTEMIS_BUILD_DIR=/artemis-build
ARG INSTALL_DIR=/opt/artemis
ARG BLAST_INSTALL_DIR=/usr/local/ncbi/blast/
ARG BROWSER_INSTALL_DIR=/usr/local/firefox
ARG ARTEMIS_WORKDIR=/artemis
ENV JAVA_OPTS="-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8"
ENV LANG="en_US.UTF-8"
ENV LANGUAGE="en_US.UTF-8"
ENV LC_ALL="en_US.UTF-8"
ENV LC_COLLATE="en_US.UTF-8"
ENV LC_CTYPE="en_US.UTF-8"

# Mount points
RUN mkdir -p $ARTEMIS_WORKDIR && chmod 777 $ARTEMIS_WORKDIR

# Install main dependencies
RUN apt-get update --quiet --assume-yes
RUN apt-get upgrade --quiet --assume-yes
RUN apt-get install --quiet --assume-yes locales openjdk-11-jdk libxtst6 libxrender1 libxext6 libexpat1 fonts-dejavu-core fontconfig-config libfontconfig1 libfreetype6 libpng16-16 curl wget maven ant
RUN update-alternatives --config java
RUN update-alternatives --config javac

RUN echo "Java version installed: `java -version`"

# Set locale
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
RUN locale-gen en_US.UTF-8

# Build and install Artemis
# No tests are run currently as some of them pop up windows and hence require X
RUN mkdir -p $INSTALL_DIR
RUN mkdir -p $ARTEMIS_BUILD_DIR
COPY . $ARTEMIS_BUILD_DIR
RUN cd $ARTEMIS_BUILD_DIR && mvn validate && mvn -Djarsigner.skip=true -Dskip.tests=true package -P release
RUN tar xvf $ARTEMIS_BUILD_DIR/target/release-artifacts/unix-release/artemis-unix-release-*.tar.gz --strip-components=1 -C ${INSTALL_DIR}
RUN rm -rf $ARTEMIS_BUILD_DIR && rm -rf ~/.m2

# Install Blast+
RUN mkdir -p $BLAST_INSTALL_DIR
RUN curl --fail -L ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.9.0+-x64-linux.tar.gz | tar xzf - --strip-components=1 -C $BLAST_INSTALL_DIR

# Install Firefox for use with pfam etc (use firejail for increased security)
RUN apt-get install --quiet --assume-yes libgtk-3-0 libdbus-glib-1-2 libxt6 firejail
RUN mkdir -p $BROWSER_INSTALL_DIR
RUN wget -O firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-GB" && \
tar xvf /firefox.tar.bz2 && \
rm -f /firefox.tar.bz2 && \
mv /firefox /usr/local/

RUN echo "firejail --private --dns=8.8.8.8 --dns=8.8.4.4 $BROWSER_INSTALL_DIR/firefox -no-remote "'"$@"' > /usr/bin/firefox && chmod 555 /usr/bin/firefox

# Cleanup
RUN apt-get autoremove
RUN apt-get clean

# Environment
ENV PATH=$INSTALL_DIR:$INSTALL_DIR/dist:$INSTALL_DIR/etc:$BLAST_INSTALL_DIR/bin:$PATH
ENV CLASSPATH=$INSTALL_DIR:$INSTALL_DIR/dist:$INSTALL_DIR/etc:${CLASSPATH}
ENV HOME=$ARTEMIS_WORKDIR
WORKDIR $ARTEMIS_WORKDIR

# Define default command.
CMD echo 'Usage: docker run -d -e DISPLAY="<your display name>:0" -v <your user home directory>:/home/artuser -v <your data folder>:/artemis' && \
echo ' --user $(id -u):$(id -g) -e ARTEMIS_JVM_FLAGS="-Duser.home=/home/artuser -Djava.io.tmpdir=/tmp" --tmpfs /tmp' && \
echo ' --rm artemis <program name [art|act|bamview|dnaplotter]> [program arguments]' && \
echo && \
echo 'For help, please go to http://sanger-pathogens.github.io/Artemis/'

14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ The Artemis Software is a set of software tools for genome browsing and annotati

[![Build Status](https://travis-ci.org/sanger-pathogens/Artemis.svg?branch=master)](https://travis-ci.org/sanger-pathogens/Artemis)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-brightgreen.svg)](https://github.com/sanger-pathogens/Artemis/blob/master/LICENSE)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io/recipes/artemis/README.html)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io/recipes/artemis/README.html)
![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/sangerpathogens/artemis)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2F16.10.944-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/16.10.944)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2Fbtr703-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/btr703)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2Fbtn529-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/btn529)
[![status](https://img.shields.io/badge/BIB-10.1093%2Fbib%2F4.2.124-brightgreen.svg)](https://doi.org/10.1093/bib/4.2.124)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2Fbti553-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/bti553)
[![status](https://img.shields.io/badge/BIB-10.1093%2Fbib%2Fbbr073-brightgreen.svg)](https://doi.org/10.1093/bib/bbr073)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2Fbtq010-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/btq010)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2Fbtn578-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/btn578)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093%2Fbioinformatics%2Fbtn578-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/btn578)

![GitHub Releases (by Release)](https://img.shields.io/github/downloads/sanger-pathogens/artemis/v18.0.2/total)

## Contents
* [Introduction](#introduction)
Expand Down Expand Up @@ -41,7 +44,7 @@ For further information and details on how to download the Artemis software, ple

## Prerequisites

Java 9+ must be installed. Ideally Java 11.
Java version 9 or later must be installed. Ideally Java 11 should be used. The easiest way to install a non-commercial open source Java version is from [AdoptOpenJDK](https://adoptopenjdk.net/releases.html) - just select the OpenJDK 11 and Hotspot options for the relevant platform. See the [GitHub pages and manuals](#documentation) for further options. A Java installation is not required if installing via Bioconda or Docker.

## Installation

Expand Down Expand Up @@ -78,7 +81,7 @@ mvn -Dhttps.proxyHost=myproxyhost -Dhttps.proxyPort=myproxyport -DproxySet=true
```
This will build the application jars and place them in target/jars and win-jars folders. The win-jars jars have the etc folder files bundled in, for Windows.

## Building Release artifacts
## Building Release Artifacts
To build .zip or .gz installables with unsigned jars, use the following command:
```
mvn -Djarsigner.skip=true clean package -P release
Expand Down Expand Up @@ -154,6 +157,9 @@ For more information on how to download Artemis, please see the [Artemis GitHub

## Documentation

Artemis GitHub pages:
http://sanger-pathogens.github.io/Artemis/

The Artemis user manual is at:
http://sanger-pathogens.github.io/Artemis/Artemis/

Expand Down
8 changes: 4 additions & 4 deletions etc/versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Artemis Release 18.0.2
ACT Release 18.0.2
DNAPlotter Release 18.0.2
BamView 18.0.2
Artemis Release 18.0.3
ACT Release 18.0.3
DNAPlotter Release 18.0.3
BamView 18.0.3
6 changes: 3 additions & 3 deletions maven-lib/README.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
The appbundler jar was compiled from:

https://bitbucket.org/infinitekind/appbundler/overview
https://github.com/TheInfiniteKind/appbundler/

The jar is run by simply running "ant"

Currently compiled in Java 10 (compatible with Java 8+). This project is a fork of the Oracle appbundler.
Currently compiled in Java 11. This project is a fork of the Oracle appbundler.

Date: 18 Oct 2018
Date: 06 Aug 2019
Binary file modified maven-lib/appbundler-1.0ea.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>uk.ac.sanger</groupId>
<artifactId>artemis</artifactId>
<version>18.0.2</version>
<version>18.0.3</version>

<name>Artemis</name>
<description>Artemis is a free genome browser and annotation tool that allows visualisation of sequence features, next generation data and the results of analyses within the context of the sequence, and also its six-frame translation.
Expand Down Expand Up @@ -360,7 +360,7 @@ Artemis is written in Java, and is available for UNIX, Macintosh and Windows sys
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-maven-3</id>
Expand Down

0 comments on commit 66317a6

Please sign in to comment.