Cytoscape Docker image, profiling
This commit is contained in:
37
cytoscape_docker/Dockerfile
Normal file
37
cytoscape_docker/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
# based on official Cytoscape image: https://github.com/cytoscape/docker-cytoscape-desktop
|
||||
# version more compact due to:
|
||||
# - removed unnecessary packages and instructions --> remote display not used
|
||||
# - included all environment variables within this Dockerfile, no need to use Docker compose for the build process
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# environment variables
|
||||
ENV CYTOSCAPE_VERSION=3.10.2
|
||||
ENV VIRTUAL_SCREEN_WIDTH=1920
|
||||
ENV VIRTUAL_SCREEN_HEIGHT=1080
|
||||
ENV CYREST_PORT=1234
|
||||
ENV SUPERVISOR_CFG="/etc/supervisor/conf.d/supervisord.conf"
|
||||
|
||||
# labels
|
||||
LABEL cytoscape_version="${CYTOSCAPE_VERSION}"
|
||||
LABEL context="independent CyREST instance for graph rendering"
|
||||
|
||||
# change user
|
||||
USER root
|
||||
# install necessary packages
|
||||
RUN apt update && apt full-upgrade -y && apt -y install \
|
||||
libxcursor1 \
|
||||
openjdk-17-jre \
|
||||
supervisor \
|
||||
wget \
|
||||
xvfb
|
||||
# set Java home directory as permanently set ENV var
|
||||
RUN echo "export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64" >> /root/.bashrc
|
||||
# download and extract Cytoscape
|
||||
RUN wget https://github.com/cytoscape/cytoscape/releases/download/${CYTOSCAPE_VERSION}/cytoscape-unix-${CYTOSCAPE_VERSION}.tar.gz
|
||||
RUN tar -xf cytoscape-unix-${CYTOSCAPE_VERSION}.tar.gz && rm cytoscape-unix-${CYTOSCAPE_VERSION}.tar.gz
|
||||
|
||||
# supervisord config
|
||||
# supervisor used to start the virtual display via Xvfb and the Cytoscape process with web server (CyREST)
|
||||
COPY supervisord.conf ${SUPERVISOR_CFG}
|
||||
EXPOSE ${CYREST_PORT}
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
22
cytoscape_docker/supervisord.conf
Normal file
22
cytoscape_docker/supervisord.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
# based on official Cytoscape image: https://github.com/cytoscape/docker-cytoscape-desktop
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:xvfb]
|
||||
priority=1
|
||||
directory=/
|
||||
command=/usr/bin/Xvfb :1 -screen 0 "%(ENV_VIRTUAL_SCREEN_WIDTH)s"x"%(ENV_VIRTUAL_SCREEN_HEIGHT)s"x24 +extension RANDR
|
||||
user=root
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopsignal=QUIT
|
||||
stdout_logfile=/var/log/xvfb.log
|
||||
stderr_logfile=/var/log/xvfb.err
|
||||
|
||||
[program:cytoscape]
|
||||
priority=30
|
||||
command=/bin/bash -c 'rm -rf /root/CytoscapeConfiguration && /cytoscape-unix-%(ENV_CYTOSCAPE_VERSION)s/cytoscape.sh --rest %(ENV_CYREST_PORT)s'
|
||||
user=root
|
||||
autostart=true
|
||||
stopsignal=QUIT
|
||||
environment=DISPLAY=":1",HOME="/root"
|
||||
Reference in New Issue
Block a user