Skip to content

Commit

Permalink
biotransformer package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
popenc committed Aug 7, 2024
1 parent 81f036e commit 879cdb4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
env/
__pycache__/
.idea/
ExtractedJar/
.github/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ RUN apt-get update -y && \
COPY . /src/
WORKDIR /src

RUN chown -R $APP_USER:$APP_USER /src /tmp
# RUN rm -rf \
# /usr/local/lib/python3.11/site-packages/pip-23.1.2.dist-info \
# /root/.cache/pip \
# /usr/local/lib/python3.11/site-packages/pip \
# /usr/local/pip3.11 \
# /usr/local/pip3 \
# /usr/local/pip

RUN mkdir -p /var/www

RUN chown -R $APP_USER:$APP_USER /src /tmp /var/www

RUN chmod 755 /src/start_flask.sh

Expand Down
14 changes: 12 additions & 2 deletions bt_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,23 @@ def execute_bt3(self, smiles, pred_type, gen_limit, predictions_filename):
"""
Executes biotransformer jar file for predictions.
"""

logging.warning("Using the following jar: {}".format(BT_JAR_NAME))

# subprocess.run(["java", "-jar", BT_JAR_NAME,
# "--task", "pred",
# "--btType", pred_type,
# "--ismiles", smiles,
# "--csvoutput", predictions_filename,
# "--nsteps", str(gen_limit),
# "-useDB", "false"
# ], cwd=BT_JAR_PATH)
subprocess.run(["java", "-jar", BT_JAR_NAME,
"--task", "pred",
"--btType", pred_type,
"--ismiles", smiles,
"--csvoutput", predictions_filename,
"--nsteps", str(gen_limit),
"-useDB", "false"
"--nsteps", str(gen_limit)
], cwd=BT_JAR_PATH)

def build_endpoint_args(self):
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ services:
# - ./:/src
environment:
- BT_JAR_PATH=/src/biotransformer3.0jar
- BT_JAR_NAME=BioTransformer3.0_20230525.jar
- BT_JAR_NAME=biotransformer.jar # name of .jar in biotransformer3.0jar/

0 comments on commit 879cdb4

Please sign in to comment.