From 0c40328ae006cc45d12c59050e9efd2c4af76a9a Mon Sep 17 00:00:00 2001 From: Bundaberg-Joey <44094475+Bundaberg-Joey@users.noreply.github.com> Date: Thu, 7 Apr 2022 17:49:29 +0100 Subject: [PATCH 1/2] adding docker file and associated requirements --- Dockerfile | 19 +++++++++++++++++++ requirements.txt | 12 +++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7c3773f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM python:3.7-slim + +# Prevents .pyc file generation in the container +ENV PYTHONDONTWRITEBYTECODE=1 +# Turns off buffering for easier container logging +ENV PYTHONUNBUFFERED=1 + +# install relevant packages to env (e.g. git) +RUN apt-get -y update \ + && apt-get install --reinstall -y build-essential \ + && apt-get install -y gcc + +# Install pip requirements for python +COPY requirements.txt . +RUN python -m pip install --no-cache-dir -r requirements.txt \ + && python -m pip install --no-cache-dir --no-input pconsc4 \ + && rm requirements.txt + +CMD ["bash"] diff --git a/requirements.txt b/requirements.txt index b7eadd0..336e18a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,8 @@ -numpy +h5py==2.10.0 +keras==2.2.4 +tensorflow >=1.12,<2.0 +pythran==0.9.5 +beniget==0.2.1 +gast==0.3.3 Cython -scipy -keras -pyGaussDCA -h5py +numpy \ No newline at end of file From f14ca90fed987b77ce481c72189025ef2c1ab7bb Mon Sep 17 00:00:00 2001 From: Bundaberg-Joey <44094475+Bundaberg-Joey@users.noreply.github.com> Date: Thu, 7 Apr 2022 17:49:40 +0100 Subject: [PATCH 2/2] updating readme with docker changes --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 4b1a274..d0963c3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ # PconsC4: Fast, accurate, and hassle-free contact prediction. +## Installation with Docker +To create a minimal python environment containing pconsc4, run the below command in a directory containing the `Dockerfile` (note, the docker engine must be installed). +```bash +docker build -t pconsc4 . +``` + +Once created, you can enter a simple shell session using the below command. The installation can be confirmed by running `python3` and importing the `pconsc4` library. +```bash +docker run --rm -it pconsc4 +``` + ## Installation instructions: pip3 install numpy Cython pythran &&