Skip to content

Commit

Permalink
Merge pull request #19 from Duke-GCB/upgrade-predictors-python3
Browse files Browse the repository at this point in the history
Upgrade predictors to python3
  • Loading branch information
dleehr authored Aug 23, 2019
2 parents b06ca0b + 1e1ce87 commit a5586cb
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM ubuntu:xenial
MAINTAINER "Dan Leehr" [email protected]
FROM python:3.7
LABEL maintainer="[email protected]"

RUN apt-get update && apt-get install -y \
git \
python3 python3-pip python-pip\
r-base

### Step 1: Install the worker and its dependencies
Expand All @@ -14,29 +13,10 @@ RUN pip3 install -r requirements.txt
ADD . /opt/tf-predictions-worker/
ENV PATH /opt/tf-predictions-worker/:$PATH

### Step 2: Install LIBSVM, needed by predict-tf-binding
# Makefile has no install target, so we compile and update PATH
# Owned by root and placed in /opt

ENV LIBSVM_VER 321
RUN curl -SL https://github.com/cjlin1/libsvm/archive/v${LIBSVM_VER}.tar.gz | tar -xzC /opt # makes /opt/libsvm-321
WORKDIR /opt/libsvm-${LIBSVM_VER}
RUN make

# Build shared lib for python bindings
WORKDIR /opt/libsvm-${LIBSVM_VER}/python
RUN make

# Install libsvm and python bindings
# These have no installer so we place the library and python bindings manually
RUN cp /opt/libsvm-${LIBSVM_VER}/libsvm.so* /usr/lib/
RUN ldconfig
RUN cp /opt/libsvm-${LIBSVM_VER}/python/*.py /usr/local/lib/python2.7/dist-packages/

### Step 3: Install Predict-TF-Binding from GitHub
WORKDIR /opt/
RUN git clone https://github.com/Duke-GCB/Predict-TF-Binding.git predict-tf-binding
RUN pip install -r /opt/predict-tf-binding/requirements.txt
RUN pip3 install -r /opt/predict-tf-binding/requirements.txt
ENV PATH /opt/predict-tf-binding/:$PATH

### Step 4: Install Predict-TF-Preference from GitHub
Expand Down

0 comments on commit a5586cb

Please sign in to comment.