Skip to content

Commit

Permalink
updating readme [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
GemmaTuron authored and ersilia-bot committed Feb 20, 2024
2 parents c7519a0 + 8d5512e commit c1e0a85
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM bentoml/model-server:0.11.0-py37
MAINTAINER ersilia

RUN conda install -c conda-forge rdkit=2021.03
RUN conda install -c mordred-descriptor mordred=1.2
RUN pip install rdkit==2023.3.2
RUN pip install mordred==1.2
RUN pip install timeout-decorator==0.5.0
RUN pip install pandas==1.3.5

WORKDIR /repo
COPY ./repo
COPY ./repo
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ A set of ca 1,800 chemical descriptors, including both RDKit and original module

## Ersilia model URLs
* [GitHub](https://github.com/ersilia-os/eos78ao)
* [AWS S3](https://ersilia-models-zipped.s3.eu-central-1.amazonaws.com/eos78ao.zip)
* [DockerHub](https://hub.docker.com/r/ersiliaos/eos78ao) (AMD64, ARM64)

## Citation

Expand Down
8 changes: 7 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@
"Publication": "https://jcheminf.biomedcentral.com/articles/10.1186/s13321-018-0258-y",
"Source Code": "https://github.com/mordred-descriptor/mordred",
"License": "BSD-3.0",
"Contributor": "miquelduranfrigola"
"Contributor": "miquelduranfrigola",
"S3": "https://ersilia-models-zipped.s3.eu-central-1.amazonaws.com/eos78ao.zip",
"DockerHub": "https://hub.docker.com/r/ersiliaos/eos78ao",
"Docker Architecture": [
"AMD64",
"ARM64"
]
}
File renamed without changes.
1 change: 1 addition & 0 deletions model/framework/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python $1/code/main.py $2 $3
8 changes: 4 additions & 4 deletions src/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def set_checkpoints_dir(self, dest):
def set_framework_dir(self, dest):
self.framework_dir = os.path.abspath(dest)

def calculate(self, smiles_list):
def run(self, smiles_list):
tmp_folder = tempfile.mkdtemp()
data_file = os.path.join(tmp_folder, self.DATA_FILE)
pred_file = os.path.join(tmp_folder, self.PRED_FILE)
Expand All @@ -57,7 +57,7 @@ def calculate(self, smiles_list):
run_file = os.path.join(tmp_folder, self.RUN_FILE)
with open(run_file, "w") as f:
lines = [
"python {0}/calculate.py {1} {2}".format(
"bash {0}/run.sh {0} {1} {2}".format(
self.framework_dir,
data_file,
pred_file
Expand Down Expand Up @@ -132,8 +132,8 @@ def save(self, dst):
@artifacts([Artifact("model")])
class Service(BentoService):
@api(input=JsonInput(), batch=True)
def calculate(self, input: List[JsonSerializable]):
def run(self, input: List[JsonSerializable]):
input = input[0]
smiles_list = [inp["input"] for inp in input]
output = self.artifacts.model.calculate(smiles_list)
output = self.artifacts.model.run(smiles_list)
return [output]

0 comments on commit c1e0a85

Please sign in to comment.