Skip to content
Snippets Groups Projects
Commit ba40b7a6 authored by Peng Lian's avatar Peng Lian
Browse files

Update adt

parent 8891eda1
No related merge requests found
FROM git.biohpc.swmed.edu:5050/astrocyte/container/astrocyte-viz-base:ubuntu-18
ARG ARG_HOME="/home/headless"
ARG STARTUPDIR="/dockerstartup"
ARG LOG_FOLDER="/tmp/astrocyte-adt"
ARG ADT_VERSION="1.5.7p1"
ARG AUTODOCK_VERSION="4.2.6"
ARG VINA_VERSION="1.2.3"
ENV LANG en_US.UTF-8
ENV HOME=${ARG_HOME:-/home/headless}
ENV PW=${ARG_PW:-headless}
ENV STARTUPDIR="/dockerstartup"
ENV DISPLAY=":6"
ENV VNC_PORT="5906"
ENV VNC_RESOLUTION="1280x1024"
ENV VNC_BLACKLIST_THRESHOLD=-20
ENV VNC_BLACKLIST_TIMEOUT=-0
ENV VNC_COL_DEPTH=24
ENV LOG_FOLDER=${LOG_FOLDER:-"/tmp/astrocyte-adt"}
ENV NO_VNC_HOME="/usr/share/usr/local/share/noVNCdim"
ENV NO_VNC_PORT="6900"
ENV ADT_VERSION="${ADT_VERSION:-1.5.7p1}"
ENV AUTODOCK_VERSION="${AUTODOCK_VERSION:-4.2.6}"
ENV VINA_VERSION="${VINA_VERSION:-1.2.3}"
......@@ -30,11 +14,15 @@ COPY ["./src/run_docking", "/usr/local/bin/"]
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
build-essential \
csh \
apt-utils \
curl \
openbabel \
&& \
\
# set default python to python3
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
\
# MGLtoos
curl https://ccsb.scripps.edu/mgltools/download/491/ --output mgltools-${ADT_VERSION}.tar.gz && \
tar zxf mgltools-${ADT_VERSION}.tar.gz && \
......@@ -44,7 +32,7 @@ RUN apt-get update && \
cat initMGLtools.sh >> /etc/profile && \
cd && \
\
# Autodock
# Autodock & Autogrid
curl https://autodock.scripps.edu/wp-content/uploads/sites/56/2021/10/autodocksuite-${AUTODOCK_VERSION}-x86_64Linux2.tar --output autodock-${AUTODOCK_VERSION}.tar && \
tar xf autodock-${AUTODOCK_VERSION}.tar && \
mv x86_64Linux2/auto* /usr/local/bin && \
......
......@@ -11,10 +11,6 @@ BIOHPC_REGISTRY="git.biohpc.swmed.edu:5050/astrocyte/container"
# build docker
sudo docker build -t ${REGISTRY}/${REPO}:${TAG} .
# # push to registry
# sudo docker login
# sudo docker push ${REGISTRY}/${REPO}:${TAG}
# push to BioHPC
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
......@@ -30,7 +26,6 @@ else
TAGL=$TAG
fi
# build singularity
sudo docker save ${REGISTRY}/${REPO}:${TAG} > ${REPO}_${TAG}.tar
rm -fr ${REPO}_${TAGL}.sif
......
......@@ -2,32 +2,10 @@
REPO="astrocyte-adt"
TAG="latest"
# Set the DISPLAY
DISPLAY=":6"
used_ports=$(lsof -i -P -n | grep TCP | awk -F: '{print $NF}' | awk '{print $1}' | sort -un)
for i in $(seq 6 99); do
if echo $used_ports | grep -w $(expr 5900 + $i) > /dev/null; then
continue
else
DISPLAY=":$i";
break
fi
done
# Set novnc http port
for i in $(seq 0 99); do
NO_VNC_PORT=$(expr 6900 + $i)
if echo $used_ports | grep -w $NO_VNC_PORT > /dev/null; then
continue
else
break
fi
done
# Prepare log file locations
calling_username=$(id -un)
host_name=$(hostname -s)
logfolder=/tmp/astrocyte-adt-${host_name}-${calling_username}-$(echo $DISPLAY | tr -d ":")
logfolder=/tmp/astrocyte-adt-${host_name}-${calling_username}-$(date +%s)
rm -fr $logfolder
mkdir -p $logfolder/$calling_username
mkdir -p $logfolder/run
......@@ -35,7 +13,7 @@ mkdir -p $logfolder/var/log
chmod -R 777 $logfolder
chmod 700 $logfolder
AUTOSTART_COMMAND="xfce4-terminal -e /usr/local/adt/mgltools-1.5.7p1/bin/adt"
AUTOSTART_COMMAND="cd $outputDir; xfce4-terminal -e /usr/local/adt/mgltools-1.5.7p1/bin/adt"
# Prepare the bind string
bind_strings="$logfolder/run:/run,$logfolder/var/log:/var/log"
......@@ -51,8 +29,7 @@ fi
echo "source /etc/profile" > $logfolder/$calling_username/.bashrc
# mount and run
SINGULARITYENV_DISPLAY="$DISPLAY" \
SINGULARITYENV_NO_VNC_PORT="$NO_VNC_PORT" \
SINGULARITYENV_NO_VNC_PORT="${VIZAPP_PORT:-$NO_VNC_PORT}" \
SINGULARITYENV_AUTOSTART_COMMAND="$AUTOSTART_COMMAND" \
SINGULARITYENV_LOG_FOLDER="$logfolder" \
singularity run --nv -e \
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment