Skip to content

Commit

Permalink
Merge pull request #138 from luk27official/docking
Browse files Browse the repository at this point in the history
Frontend update, add "tasks" including molecular docking
  • Loading branch information
skodapetr authored Jan 27, 2024
2 parents 82ac98e + 1f8e765 commit 4f56790
Show file tree
Hide file tree
Showing 90 changed files with 10,961 additions and 19,592 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.dockerignore
**/.DS_Store
**/node_modules
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
.*
!.dockerignore

# Selected file.
*.iml
Expand Down
14 changes: 7 additions & 7 deletions administration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# java-tools
#

FROM debian:bookworm-20211115 as java-tools
FROM debian:bookworm-20231009 as java-tools

RUN apt-get update \
&& apt-get -y --no-install-recommends install openjdk-17-jdk
Expand All @@ -17,17 +17,17 @@ RUN chmod +x ./gradlew && ./gradlew installDist \
# administration
#

FROM debian:bookworm-20211115
FROM debian:bookworm-20231009

ARG UID=5988
ARG GID=5988

RUN apt-get update \
&& apt-get -y --no-install-recommends install \
wget curl \
python3 python3-pip python3-venv \
openjdk-17-jre-headless \
libgomp1 vim
&& apt-get -y --no-install-recommends install \
wget curl \
python3 python3-pip python3-venv \
openjdk-17-jre-headless \
libgomp1 vim

# https://github.com/python/cpython/issues/102134
ENV VIRTUAL_ENV=/opt/venv
Expand Down
30 changes: 26 additions & 4 deletions docker-compose-prankweb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ services:
GID: ${GID}
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672"
PRANKWEB_DATA: "/data/prankweb"
PRANKWEB_DATA_PREDICTIONS: "/data/prankweb/predictions/"
PRANKWEB_DATA_DOCKING: "/data/prankweb/docking/"
restart: unless-stopped
volumes:
- predictions:/data/prankweb
Expand All @@ -60,17 +61,35 @@ services:
args:
UID: ${UID}
GID: ${GID}
command: ["celery", "--app=celery_p2rank", "worker", "--concurrency=4", "--hostname=executor-p2rank"]
command: ["celery", "--app=celery_p2rank", "worker", "--queues=p2rank", "--concurrency=4", "--hostname=executor-p2rank"]
depends_on:
rabbitmq:
condition: service_healthy
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672"
LOCK_DIRECTORY: "/data/prankweb/lock"
restart: unless-stopped
volumes:
- conservation:/data/conservation
- predictions:/data/prankweb
- predictions:/data/prankweb/predictions
- docking:/data/prankweb/docking
executor-docking:
build:
context: ./
dockerfile: ./executor-docking/Dockerfile
args:
UID: ${UID}
GID: ${GID}
command: ["celery", "--app=celery_docking", "worker", "--queues=docking", "--concurrency=4", "--hostname=executor-docking"]
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672"
restart: unless-stopped
volumes:
- docking:/data/prankweb/docking
- predictions:/data/prankweb/predictions
depends_on:
rabbitmq:
condition: service_healthy
condition: service_healthy
monitor:
build:
context: ./
Expand Down Expand Up @@ -101,3 +120,6 @@ volumes:
services:
external: True
name: prankweb_services
docking:
external: True
name: prankweb_docking
37 changes: 30 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
build: https://github.com/mher/flower.git
command: "celery flower --url_prefix=service/flower"
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672"
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER:-user}:${RABBITMQ_DEFAULT_PASS:-1234}@rabbitmq:5672"
depends_on:
rabbitmq:
condition: service_healthy
Expand All @@ -46,27 +46,47 @@ services:
rabbitmq:
condition: service_healthy
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672"
PRANKWEB_DATA: "/data/prankweb"
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER:-user}:${RABBITMQ_DEFAULT_PASS:-1234}@rabbitmq:5672"
PRANKWEB_DATA_PREDICTIONS: "/data/prankweb/predictions/"
PRANKWEB_DATA_DOCKING: "/data/prankweb/docking/"
volumes:
- predictions:/data/prankweb
- predictions:/data/prankweb/predictions
- docking:/data/prankweb/docking
executor-p2rank:
build:
context: ./
dockerfile: ./executor-p2rank/Dockerfile
args:
UID: ${UID:-5988}
GID: ${GID:-5988}
command: ["celery", "--app=celery_p2rank", "worker", "--concurrency=4", "--hostname=executor-p2rank"]
command: ["celery", "--app=celery_p2rank", "worker", "--queues=p2rank", "--concurrency=4", "--hostname=executor-p2rank"]
depends_on:
rabbitmq:
condition: service_healthy
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672"
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER:-user}:${RABBITMQ_DEFAULT_PASS:-1234}@rabbitmq:5672"
LOCK_DIRECTORY: "/data/prankweb/lock"
volumes:
- conservation:/data/conservation
- predictions:/data/prankweb
- predictions:/data/prankweb/predictions
- docking:/data/prankweb/docking
executor-docking:
build:
context: ./
dockerfile: ./executor-docking/Dockerfile
args:
UID: ${UID:-5988}
GID: ${GID:-5988}
command: ["celery", "--app=celery_docking", "worker", "--queues=docking", "--concurrency=4", "--hostname=executor-docking"]
environment:
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER:-user}:${RABBITMQ_DEFAULT_PASS:-1234}@rabbitmq:5672"
restart: unless-stopped
volumes:
- docking:/data/prankweb/docking
- predictions:/data/prankweb/predictions
depends_on:
rabbitmq:
condition: service_healthy
prometheus:
build:
context: ./
Expand All @@ -92,3 +112,6 @@ volumes:
services:
external: True
name: prankweb_services
docking:
external: True
name: prankweb_docking
101 changes: 95 additions & 6 deletions documentation/prankweb.open-api.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
openapi: 3.0.0
openapi: 3.0.2

info:
title: Prankweb API
version: 1.0.0
version: 1.0.1

servers:
- url: https://prankweb.cz/api/v2/predictions/
- url: https://prankweb.cz/api/v2/

paths:
/{database}/{task}/:
/predictions/{database}/{task}/:
get:
parameters:
- in: path
Expand All @@ -28,7 +28,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Task'
/{database}/{task}/log:
/predictions/{database}/{task}/log:
get:
parameters:
- in: path
Expand All @@ -48,7 +48,7 @@ paths:
text/plain:
schema:
type: string
/{database}/{task}/public/prediction.json:
/predictions/{database}/{task}/public/prediction.json:
get:
parameters:
- in: path
Expand All @@ -68,6 +68,53 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Prediction'
/docking/{database}/{task}/tasks:
get:
parameters:
- in: path
name: database
required: true
schema:
$ref: '#/components/schemas/DatabaseId'
- in: path
name: task
required: true
schema:
$ref: '#/components/schemas/TaskId'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/DockingTaskList'
/docking/{database}/{task}/public/result.json:
post:
parameters:
- in: path
name: database
required: true
schema:
$ref: '#/components/schemas/DatabaseId'
- in: path
name: task
required: true
schema:
$ref: '#/components/schemas/TaskId'
requestBody:
description: The request needs to contain the hash and the pocket number.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DockingRequest'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/DockingResponse'

components:
schemas:
Expand Down Expand Up @@ -148,3 +195,45 @@ components:
type: number
end:
type: number
DockingTaskList:
type: object
properties:
identifier:
type: string
tasks:
type: array
items:
type: object
properties:
id:
type: string
created:
type: string
format: date-time
lastChange:
type: string
format: date-time
status:
type: string
enum: ['queued', 'running', 'failed', 'successful']
initialData:
type: object
properties:
hash:
type: string
pocket:
type: string
DockingRequest:
type: object
properties:
hash:
type: string
pocket:
type: number
DockingResponse:
type: array
items:
type: object
properties:
url:
type: string
Loading

0 comments on commit 4f56790

Please sign in to comment.