Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to work in docker local config #749

Closed
erfelipe opened this issue Sep 29, 2024 · 26 comments · May be fixed by #770
Closed

Trying to work in docker local config #749

erfelipe opened this issue Sep 29, 2024 · 26 comments · May be fixed by #770
Labels
documentation Incorrect or insufficient documentation

Comments

@erfelipe
Copy link

Describe the documentation deficiency
Dear,
I'm try these initial steps:

git clone https://github.com/EBISPOT/ols4.git

export OLS4_CONFIG=./dataload/configs/myontology.json (based in efo.json)

copy myontology.owl to testcases folder

JAVA_OPTS="-Xms5G -Xmx25G" docker compose up

Url to existing documentation if applicable

Following the deploy in https://github.com/EBISPOT/ols4?tab=readme-ov-file#deploying-ols4

What are you trying to do?

I have many issues. The first report “last message” was: Error response from daemon: driver failed programming external connectivity on endpoint ols4-ols4-backend-1 (ec76ed6214c21e9b11ef8c85ac0294f36b559f177bd7ae0bc0d36d5f899fb595): Bind for 0.0.0.0:8080 failed: port is already allocated

The backend container is pointed to 8080:8080

image

So, by using play button, I can up the containers, except backend.

image

So I changed the 8080:8080 to 8082:8080 port in docker-compose.yml and dockerfile in database folder. Delete images and compose up process again

Now, backend is up, but dataload not working

image

And frontend do not show the local ontology, just trying to load:
image

The correct and all steps are these in github “deploying OLS4” ?

  1. Name of ontology you are trying to access, if applicable: myontology.json (put in dataload/configs)
  2. URL of term you trying to access, if applicable: --
  3. Search criteria you are trying to search for: --
  4. Anything else? Thanks for any help.
@erfelipe erfelipe added the documentation Incorrect or insufficient documentation label Sep 29, 2024
@haideriqbal
Copy link
Collaborator

From the error you've posted looks like there was something running on port 8080 already and you would need to kill that process before running the docker. For dataload part you would need to see the logs of docker to see exactly whats happening? Usually dataload fails if your ontology is not in the correct format and logs specify what exactly is failing.

I would suggest just to run your local ontologies you can follow the steps starting from here:

https://github.com/EBISPOT/ols4?tab=readme-ov-file#development-running-ols4-using-docker and use the following command to run everything up:

docker compose up --force-recreate --build --always-recreate-deps --attach-dependencies ols4-solr ols4-neo4j ols4-backend ols4-frontend

you don't need to copy your ontologies to testcases folder until unless you want to run our testcases on them

@erfelipe
Copy link
Author

erfelipe commented Oct 2, 2024

Ok. I will try your explanation and give you an feedback. Thanks @haideriqbal

@jamesamcl
Copy link
Member

@erfelipe Please can you post your config myontology.json? Using the testcases folder to put your ontology is what I do because it's mounted inside Docker, but you need to set the ontology_purl appropriately to reflect this.

@jamesamcl
Copy link
Member

So if you put myontology.owl in testcases the ontology_purl would be ./testcases/myontology.owl

@erfelipe
Copy link
Author

erfelipe commented Oct 4, 2024

@erfelipe Please can you post your config myontology.json? Using the testcases folder to put your ontology is what I do because it's mounted inside Docker, but you need to set the ontology_purl appropriately to reflect this.

Hi @jamesamcl thanks for your attention. In fact, I'm just copy the .json from efo.json and, change the purl link:

{
"ontologies": [
{
"id": "myontology",
"preferredPrefix": "myontology",
"title": "Teste local",
"uri": "http://www.ebi.ac.uk/efo",
"description": "The Experimental Factor Ontology (EFO) provides a systematic description of many experimental variables available in EBI databases, and for external projects such as the NHGRI GWAS catalogue. It combines parts of several biological ontologies, such as anatomy, disease and chemical compounds. The scope of EFO is to support the annotation, analysis and visualization of data handled by many groups at the EBI and as the core ontology for OpenTargets.org",
"homepage": "http://www.ebi.ac.uk/efo",
"mailing_list": "[email protected]",
"definition_property": [
"http://purl.obolibrary.org/obo/IAO_0000115",
"http://www.ebi.ac.uk/efo/definition"
],
"synonym_property": [
"http://www.ebi.ac.uk/efo/alternative_term",
"http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"
],
"hierarchical_property": [
"http://purl.obolibrary.org/obo/BFO_0000050",
"http://purl.obolibrary.org/obo/RO_0002202"
],
"hidden_property": [
"http://www.ebi.ac.uk/efo/has_flag"
],
"base_uri": [
"http://www.ebi.ac.uk/efo/EFO_"
],
"reasoner": "OWL2",
"oboSlims": false,
"ontology_purl": "file:///opt/dataload/testcases/myontology.rdf"
}
]
}

@erfelipe
Copy link
Author

erfelipe commented Oct 4, 2024

So if you put myontology.owl in testcases the ontology_purl would be ./testcases/myontology.owl

Yep. I put the file in:
image
and try rdf version to.

And my last advances, I change the backend port from 8080 (http default port(?)) to 8082, and the services are working now:
image

But! The frontend not working yet:

image

But I'm will use the docker command sugest by @haideriqbal above.

@NCOR-BR
Copy link

NCOR-BR commented Oct 7, 2024

I have the same problem. After exporting the docker logs I found:
"The "JAVA_OPTS" variable is not set. Defaulting to a blank string.
error while interpolating services.ols4-dataload.volumes.[]: required variable OLS4_CONFIG is missing a value: OLS4 dataload requires a config file"
The first problem (JAVA_OPTS) I've already solved. The second problem is strange because the docker-compose.yml seems to be correct.
Screenshot 2024-10-07 at 13 41 32

@haideriqbal
Copy link
Collaborator

@NCOR-BR i see its complaining about OLS4_CONFIG in your error. You would need to set OLS4_CONFIG to the json file containing your ontology config which you are trying to index. Please let us know if you still face the error after setting this variable.

@erfelipe
Copy link
Author

unless

@haideriqbal this method works now! #development-running-ols4-using-docker
I'll try to load the local ontology with copy efo.json method.
image

@haideriqbal
Copy link
Collaborator

closing this for now! feel free to reopen if you still have issues running OLS locally :)

@NCOR-BR
Copy link

NCOR-BR commented Oct 21, 2024 via email

@haideriqbal haideriqbal reopened this Oct 21, 2024
@haideriqbal
Copy link
Collaborator

@NCOR-BR whats the issue you are facing? from your previous comment it appears you were not specifying the OLS4_CONFIG variable correctly... did you try after initialising the variable correctly?

@NCOR-BR
Copy link

NCOR-BR commented Oct 21, 2024 via email

@haideriqbal
Copy link
Collaborator

Hi @NCOR-BR i can't see the screen shot you attached. Looks like you replied by email and github can't seem to process the attached screenshot correctly

@NCOR-BR
Copy link

NCOR-BR commented Oct 21, 2024

Thank you @haideriqbal .

Screenshot 2024-10-21 at 11 31 23

@haideriqbal
Copy link
Collaborator

@NCOR-BR can you share your docker logs? or let me know how you are running docker command? did you set OLS4_CONFIG variable before running the docker command?

This was referenced Oct 22, 2024
@erfelipe
Copy link
Author

Hi @haideriqbal I had a momentary breakthrough in getting the stack to work with efo.json
But the environment is not stable, there are rare moments when it works and most of the time it doesn't.
So I can't get it to work with a local ontology either.
Would it be possible, at some point, for us to meet via google meet to try to make the environment work locally? I'm in the GMT -3 time zone

@haideriqbal
Copy link
Collaborator

Hi @erfelipe today might be short notice for you but would 2 pm UK time work for you tomorrow or Wednesday? I believe it would be 11 AM for you. Let me know if that works and we can have a chat :)

@erfelipe
Copy link
Author

Hi @erfelipe today might be short notice for you but would 2 pm UK time work for you tomorrow or Wednesday? I believe it would be 11 AM for you. Let me know if that works and we can have a chat :)

Hi @haideriqbal, tomorrow will be great. Thanks for help! If you agree, can we meet in this room? I'm just want to share my screen to help in a possible solution. https://meet.google.com/sez-ropu-kzf
Best,

@haideriqbal
Copy link
Collaborator

Sounds good! talk to you tomorrow :)

@NCOR-BR
Copy link

NCOR-BR commented Oct 28, 2024 via email

@haideriqbal
Copy link
Collaborator

it might be a long shot but are you guys free now? We can start the call now? @erfelipe @NCOR-BR

@erfelipe
Copy link
Author

it might be a long shot but are you guys free now? We can start the call now? @erfelipe @NCOR-BR

Yep @haideriqbal , we can. Please. https://meet.google.com/sez-ropu-kzf

@haideriqbal
Copy link
Collaborator

cool joining now

@NCOR-BR
Copy link

NCOR-BR commented Oct 29, 2024 via email

@erfelipe
Copy link
Author

Thank you very much for your support @haideriqbal !
We couldn't have done it without your knowledge.
Best wishes,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Incorrect or insufficient documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants