petermr / xmlopensci

XML Tools and resources for Open Science
Apache License 2.0
1 stars 2 forks source link

Demo getpapers and ami-search at XMLSummerSchool 2019 #3

Open petermr opened 4 years ago

petermr commented 4 years ago

XML Summer School

These tasks have been sent out by mail

Dear all, Many thanks to all of you. Daniel, we are all beginners in Docker and we need guidance on how to create and run an image. I will also copy this to the xmlopensci issues. My apology if this is convoluted but I am not as fast as I would have been without the broken leg.

The key tasks in priority order are that

create demo resources

  1. Graham is able to run getpapers and ami-search on prepared scripts as a demo in front of the delegates. This may be with jarfiles (e.g. from tigr2ess) or it might be with dockers. This is the only essential task
    • 1A GK to alert PMR that he can do this
    • 1B PMR and GK to discuss what problems they can run. (by default this will be a standard documented query, probably creating and running oil186/)
    • 1C PMR to create a demo script
    • 1D GK to be able to demo the results (HTML, SVG) in his browser

subsidiary demo (Peter Flynn)

  1. PF to do the same in case of problems.
    • 2A GK to demo to PF how to run and demo the results.

create docker images for demo

  1. Lower priority GK, Ambarish, and Daniel to agree on
    • 3A do we need 2 dockers (one for getpapers and the other for ami) or will just a single one with both executables.
    • 3B how to make one or two Dockers that runs from the commandline. We should be able to:
    • 3C1 run docker getpapers to create a CProject (e.g. oil186) on local filestore
    • 3C2 run docker ami-search on the CProject to create a fulldatatables.html and __cooccurrence under the CProject
    • 3C3 (optional) ami-section create sections in the papers and display the HTML

It's too ambitious to put this out to delegates in general, but early adopters are welcome to try. We won't rely on any of them doing anything.

ambarishK commented 4 years ago

Dear GK, Daniel and Peter Sir

Putting my view over following point.

If we have two separate docker image for getpapers and ami3, people will have to install both of them separately. Apart, in case of two separate images, CProject directory will remain external for ami3 container. It will need extra instruction steps to mount the external volume. If we keep both images - getpapers and ami3 merged all together, there would be convenience in navigating through CProject, mydictionary and ami3 tool directory.

I run ami tool commands using ami3 docker image after mounting the external drive workDir containing CProject and mydictionary to run ami commands using ami3 docker image

petermr commented 4 years ago

Thanks Ambarish Can you and Graham work together so that he has a working version of docker for ami- and getpapers- Thanks

On Tue, Sep 17, 2019 at 7:40 AM Ambarish Kumar notifications@github.com wrote:

Dear GK, Daniel and Peter Sir

Putting my view over following point.

3A do we need 2 dockers (one for getpapers and the other for ami) or will just a single one with both executables.

If we have two separate docker image for getpapers and ami3, people will have to install both of them separately. Apart, in case of two separate images, CProject directory will remain external for ami3 container. People will have to mount it and it will need extra instruction steps to mount the external volume. If we keep both images - getpapers and ami3 merged all together, there would be convenience in navigating through CProject, mydictionary and ami3 tool directory.

I run ami tool commands using ami3 docker image after mounting the external drive workDir containing CProject and mydictionary to run ami commands using ami3 docker image

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/petermr/xmlopensci/issues/3?email_source=notifications&email_token=AAFTCS6BXPOPTVF7PSD3DUTQKB3U5A5CNFSM4IXFVAEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD63PD6Y#issuecomment-532083195, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFTCS3OA2G4MTH2PGFTJ3DQKB3U5ANCNFSM4IXFVAEA .

-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK

ambarishK commented 4 years ago

Yes sir. I am waiting for that.

nuest commented 4 years ago

@ambarishK With https://github.com/petermr/ami3/pull/2 merged, I am still unsure which Dockerfile you will be working on. I assume it is the one you wrote. If you want to try out the one I started, instructions are in the README at https://github.com/petermr/ami3/blob/master/README.md#building-docker-image

If you want to make the images easy to use for participants of a workshop, I suggest you set up an automated build on Docker Hub. I did one for my fork:

$ docker run --rm -it nuest/ami3 ami-pdf --help
Usage: ami-pdf [OPTIONS]
Description
===========
Convert PDFs to SVG-Text, SVG-graphics and Images. Does not process images,
graphics or text.often followed by ami-image and ami-xml?
Options
=======
      --dryrun=<dryrun>     for testing runs a single phase without output,
                              deletion or transformation.(NYI).
[...]
ambarishK commented 4 years ago

Dear Daniel Sir

We want to merge ami3and getpapers dockefiles together to overcome the need to mount external volume.

ami3 dockerfile build is successfull. I am stuck at getpapers dockerfile. Following dockerfile for getpapers is not built successfully.

FROM rtfpessoa/ubuntu-jdk8

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install tzdata
RUN apt-get install -y 

RUN wget https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh
RUN sh install.sh

RUN nvm install 7
RUN nvm use 7
RUN nvm alias default 7

WORKDIR /usr/src
RUN npm install --global getpapers

Please try for writing dockerfile for getpapers and merge it with ami3 dockerfile.

Keep it on priority, as I think, we have to get it done by today.

nuest commented 4 years ago

@ambarishK Could you please provide information about the issues that you face? What are the error messages?

nuest commented 4 years ago

Also want to point out https://gist.github.com/psychemedia/fff4605eb04b40de7f1ea5d975e74873

ambarishK commented 4 years ago

Sir, please go through the errors.

[root@localhost CEVOpen]# docker build -f getpapersdockerfile .
Sending build context to Docker daemon  13.66GB
Step 1/12 : FROM rtfpessoa/ubuntu-jdk8
 ---> bab88b01cff9
Step 2/12 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 748a110ae342
Step 3/12 : RUN apt-get update
 ---> Using cache
 ---> 2e3fe1302abe
Step 4/12 : RUN apt-get install tzdata
 ---> Using cache
 ---> 78f94fe50883
Step 5/12 : RUN apt-get install -y
 ---> Using cache
 ---> d657e9fb0e93
Step 6/12 : RUN nvm install 7
 ---> Running in a21b83a4f01d
 /bin/sh: 1: nvm: not found
The command '/bin/sh -c nvm install 7' returned a non-zero code: 127

---> Running in a21b83a4f01

/bin/sh: 1: nvm: not found

The command '/bin/sh -c nvm install 7' returned a non-zero code: 127

This is the getpapersdockerfile.

FROM rtfpessoa/ubuntu-jdk8

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install tzdata
RUN apt-get install -y 

RUN nvm install 7
RUN nvm use 7
RUN nvm alias default 7

WORKDIR /usr/src
RUN npm install --global getpapers
ambarishK commented 4 years ago

Let me try again with one added docker command - FROM node:4.3.2 - to the getpapersdockerfile.

nuest commented 4 years ago

I am working on the Dockerfile now and am close to finishing it. I can stop if you want to. I'd like to avoid duplicate work.

nuest commented 4 years ago

See #3.

ambarishK commented 4 years ago

Sir, you complete the work, as get same error even after adding the docker command - FROM node:4.3.2.

FROM rtfpessoa/ubuntu-jdk8

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install tzdata
RUN apt-get install -y 

FROM node:4.3.2

WORKDIR /usr/src
RUN npm install --global getpapers
[root@localhost CEVOpen]# docker build -f getpapersdockerfile .
Sending build context to Docker daemon  15.26GB
Step 1/11 : FROM rtfpessoa/ubuntu-jdk8
 ---> bab88b01cff9
Step 2/11 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 748a110ae342
Step 3/11 : RUN apt-get update
 ---> Using cache
 ---> 2e3fe1302abe
Step 4/11 : RUN apt-get install tzdata
 ---> Using cache
 ---> 78f94fe50883
Step 5/11 : RUN apt-get install -y
 ---> Using cache
 ---> d657e9fb0e93
Step 6/11 : FROM node:4.3.2
4.3.2: Pulling from library/node
fdd5d7827f33: Pull complete 
a3ed95caeb02: Pull complete 
0f35d0fe50cc: Pull complete 
627b6479c8f7: Pull complete 
67c44324f4e3: Pull complete 
b52090f6ca00: Pull complete 
ee759046b2b3: Pull complete 
Digest: sha256:6b6315542445d628980afc0664e223d7dc89f93968a43ae8c727cc437ae56b8e
Status: Downloaded newer image for node:4.3.2
 ---> 3538b8c69182
Step 7/11 : RUN nvm install 7
 ---> Running in ccda5a959970
/bin/sh: 1: nvm: not found
The command '/bin/sh -c nvm install 7' returned a non-zero code: 127
nuest commented 4 years ago

With #3 I can run:

$ docker pull nuest/ami3
$ docker run --rm -it nuest/ami3 getpapers --version
0.4.17
ambarishK commented 4 years ago

Yes!!! it is working. Thank you so much sir.

Sir, would you please share the dockerfile because it may happen to build images for newer releases of ami3.x ( at present running ami-search is generating error over command-line as well as docker as runtime).

Sir, one more thing is that mydictionaries folder should be within the ami3 image ( to avoid extra step of mounting external volume ).

ambarishK commented 4 years ago

Sir, please find the html table of compounds

petermr commented 4 years ago

Where is the URL

On Wed, 18 Sep 2019, 16:30 Ambarish Kumar, notifications@github.com wrote:

Sir, please find the html table of compounds

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/petermr/xmlopensci/issues/3?email_source=notifications&email_token=AAFTCSYZCMB6ZAWB76ITCVTQKJCTFA5CNFSM4IXFVAEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7APIEY#issuecomment-532739091, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFTCS2RNHUCJ2OODDMV5KLQKJCTFANCNFSM4IXFVAEA .

ambarishK commented 4 years ago

Sir, URL is linked in previous comment.

Re-writing it below.

https://github.com/gilienv/EssOilDB/blob/master/tables/chemistry/resolveCompTable20190828.html