Deployment Files

Perform the following steps to deploy On-premises files.

  1. docker-compose.yml

version: "3"
services:
  nginx:
    image: qureai/nginx:qureapp 
    container_name: qureapp_nginx
    command: "/start.sh"
    env_file: hct_api.env
    restart: always
    ports:
      - "2001:80"
  qure-api:
    image: qureai/qure_platform_api:3.1.5.release.1f19fbb
    container_name: qureapi
    command: startgunicorn
    restart: always
    volumes:
       - qureapi-data:/srv/data
       - ./default_run_config.json:/srv/default_run_config.json
    ports:
      - "8080:8080"
    env_file: hct_api.env

  postgres:
    image: postgres
    container_name: psql_new
    command: "postgres -N 1000"
    restart: unless-stopped
    volumes:
      - qureapi-db:/var/lib/postgresql/data
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
      - POSTGRES_USER=qure_user
      - POSTGRES_DB=qure_app
    ports:
      - "5432:5432"
  qure-api-worker-1:
    image: qureai/qure_platform_api:3.1.5.release.1f19fbb
    container_name: qureapiworker-1
    command: run_workers_threaded --num_workers=4
    env_file: hct_api.env
    volumes:
        - qureapi-data:/srv/data
        - qer-checkpoints:/srv/qer_checkpoints
        - qxr-checkpoints:/srv/cxr_checkpoints
        - qxr-blaze-checkpoints:/srv/qxr_blaze_checkpoints
        - qct-checkpoints:/srv/qct_checkpoints:ro
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
  qure-api-notebook:
    image: qureai/qure_platform_api:3.1.5.release.1f19fbb
    container_name: qureapi-notebook
    command: shell_plus --notebook -- --allow-root --ip 0.0.0.0 --NotebookApp.password=sha1:e9c30f3ff952:f15a3ef7d43f87f98048d9503149cb81b49cd539
    restart: always
    volumes:
       - qureapi-data:/srv/data
       - notebooks:/app/services/qure_platform_api/qure_platform_api_image.binary.runfiles/qureai/notebooks/
    ports:
      - "5888:8888"
    env_file: hct_api.env

  qer_checkpoints:
    image: qureai/hct_checkpoints:v3_ncct_cta_integration
    container_name: qer_checkpoints
    command: "tail -f /dev/null"
    restart: unless-stopped
    volumes:
      - qer-checkpoints:/checkpoints
  qct_checkpoints:
    image: qureai/qct_checkpoints:v1.3
    container_name: qct_checkpoints
    command: "tail -f /dev/null"
    restart: unless-stopped
    volumes:
      - qct-checkpoints:/qct_checkpoints:ro
  cxr_checkpoints:
    image: qureai/qxr_checkpoints:4.0.3_ts_models_unencrypted 
    container_name: cxr_checkpoints
    command: "tail -f /dev/null"
    restart: unless-stopped
    volumes:
      - qxr-checkpoints:/cxr_checkpoints:ro
  blaze_checkpoints:
    image: qureai/qxr_checkpoints:blaze_3.1
    container_name: blaze_checkpoints
    command: "tail -f /dev/null"
    restart: unless-stopped
    volumes:
      - qxr-blaze-checkpoints:/qxr_blaze_checkpoints
  

volumes:
  qureapi-data:
  qer-checkpoints:
  qxr-checkpoints:
  qxr-blaze-checkpoints:
  qct-checkpoints:
  qureapi-db:
  django_channel_data:
  1. hct_api.env

HCT_API_DEBUG=True
HCT_API_ALLOWED_HOSTS=*

HCT_API_DATABASE_NAME=qure_app
HCT_API_DATABASE_USER=qure_user
HCT_API_DATABASE_HOST=postgres

HCT_API_NGINX_SERVERNAME=~.
HCT_API_NGINX_PRIVATE_SERVERNAME=~.
NGINX_SERVER_NAME=~.
NGINX_PRIVATE_SERVER_NAME=~.

HCT_SOPCLASSUIDS=1.2.840.10008.5.1.4.1.1.2,1.2.840.10008.5.1.4.1.1.2.1,1.2.840.10008.5.1.4.1.1.2.2

IS_ON_PREMISE=True
IMAGE_STORAGE_PROVIDER=FS
FS_IMAGE_MANAGE_PATH=/srv/data/hct
FS_SERVER_PATH=http://nginx/files
STATIC_URL_PREFIX=/srv/data/hct
FS_IMAGE_NGINX_PREFIX=/srv/data/hct
ON_PREMISE=True

#ZIP_TEMP_DIR=/srv/data/zip

CLEAN_UP_AFTER_PROCESSING=True
MAX_TASK_PER_WORKER=-1
CLEAN_UP_DELAY=3600

AUTH_OIDC_PROVIDER=https://accounts.qure.ai/auth
KEYCLOAK_REALM=accounts
AUTH_OIDC_CLIENT_ID=onpremise
KEYCLOAK_CLIENT_SECRET=QP1eQQdJ7uCO77mDvVAZ8hZFfbxD8Lxx
AUTH_FORCE_HTTPS=False
POPULATE_DEFAULTS=True

QER_CHECKPOINTS_PATH=/srv/qer_checkpoints/checkpoints
CXR_CHECKPOINTS_PATH=/srv/cxr_checkpoints
QCT_CHECKPOINTS_PATH=/srv/qct_checkpoints
QXR_BLAZE_CHECKPOINTS_PATH=/srv/qxr_blaze_checkpoints

WORKER_ID=MAIN-API1
MACHINE_ID=machine1

SC_GENERATOR_MOUNT_PATH=/srv/data/sc_generation_mount_path
SC_GENERATION_PORT=8080
SC_GENERATION_HOST=sc_generation_api

LD_LIBRARY_PATH=/app/services/qure_platform_api/qure_platform_api_image.binary.runfiles/python_deps_nvidia_cudnn_cu11/site-packages/nvidia/cudnn/lib:/app/services/qure_platform_api/qure_platform_api_image.binary.runfiles/python_deps_nvidia_cublas_cu11/site-packages/nvidia/cublas/lib:/app/python_deps_nvidia_cuda_nvrtc_cu11/site-packages/nvidia/cuda_nvrtc/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64

DEFAULT_RUN_CONFIG_PATH=/srv/default_run_config.json
  1. default_run_config.json

{
  "qer":{},
  "qct":{},
  "qxr":{},
  "qmsk":{},
  "portal":{"enabled": true}
}#contact qure support for changing this config

Log in to the docker-compose.

docker login -u prsjn
dckr_pat_6bQdystrTNrhIDs-BHtBVqzS9lc

Attention:

If the server does not have internet access, use the following command to transfer Docker images from one system to another.

#Taking #qureai/nginx:qureapp image as example
#run this on system #1
docker save -o sample1.tar nginx:qureapp

#tranfer the file to system #2

#run this on system #2
docker load -i sample1.tar

#now you should be able to see your nginx:qureapp image in the system #2

Last updated