|
| 1 | +--- |
| 2 | +services: |
| 3 | + girder: |
| 4 | + image: dsarchive/wsi_deid:latest |
| 5 | + restart: unless-stopped |
| 6 | + # To have full capabilities with S3 assetstores, we use a user file system |
| 7 | + # (fuse). This requires some privileges. This is not needed if only |
| 8 | + # filesystem assetstores are used. Instead of privileged mode, fuse can |
| 9 | + # use specific devices, security_opt, and cap_add: |
| 10 | + # devices: |
| 11 | + # - /dev/fuse:/dev/fuse |
| 12 | + # security_opt: |
| 13 | + # - apparmor:unconfined |
| 14 | + # cap_add: |
| 15 | + # - SYS_ADMIN |
| 16 | + # but these may be somewhat host specific, so we default to privileged. If |
| 17 | + # the docker daemon is being run with --no-new-privileges, fuse may not |
| 18 | + # work. |
| 19 | + # See also https://github.com/docker/for-linux/issues/321 for possible |
| 20 | + # methods to avoid both privileged mode and cap_add SYS_ADMIN. |
| 21 | + privileged: true |
| 22 | + # Set DSA_PORT to expose the interface on another port (default 8080). |
| 23 | + ports: |
| 24 | + - "${DSA_PORT:-8080}:8080" |
| 25 | + # Set DSA_USER to a user id that is part of the docker group (e.g., |
| 26 | + # `DSA_USER=$(id -u):$(id -g)`). This makes files in assetstores and logs |
| 27 | + # owned by that user and provides permissions to manage docker |
| 28 | + environment: |
| 29 | + DSA_USER: ${DSA_USER:-} |
| 30 | + GIRDER_CONFIG: /conf/girder.local.conf |
| 31 | + PROVISION: tasks |
| 32 | + volumes: |
| 33 | + # Needed to use slicer_cli_web to run docker containers |
| 34 | + - /var/run/docker.sock:/var/run/docker.sock |
| 35 | + # Default assetstore |
| 36 | + - fsdata:/assetstore |
| 37 | + - logs:/logs |
| 38 | + # Change for local files: |
| 39 | + # - ./assetstore:/assetstore |
| 40 | + # - ./logs:/logs |
| 41 | + # Location of girder.local.conf and provision.py; add to use local |
| 42 | + # versions |
| 43 | + # - .:/conf |
| 44 | + # Add for import and export location. This can also be done with a |
| 45 | + # docker-compose.local.yml file. See the example. |
| 46 | + # - <some local path>:/import |
| 47 | + # - <some local path>:/export |
| 48 | + - ./worker.local.cfg:/venv/lib/python3.11/site-packages/girder_worker/worker.local.cfg |
| 49 | + depends_on: |
| 50 | + - mongodb |
| 51 | + - memcached |
| 52 | + - rabbitmq |
| 53 | + mongodb: |
| 54 | + image: "mongo:latest" |
| 55 | + restart: unless-stopped |
| 56 | + volumes: |
| 57 | + # Location to store database files |
| 58 | + # Change for local files: |
| 59 | + # - ./db:/data/db |
| 60 | + # - ./logs:/var/log/mongodb |
| 61 | + - dbdata:/data/db |
| 62 | + memcached: |
| 63 | + image: memcached |
| 64 | + command: -m 4096 |
| 65 | + restart: unless-stopped |
| 66 | + # rabbitmq is used to communicate to the worker to run tasks |
| 67 | + rabbitmq: |
| 68 | + image: "rabbitmq:latest" |
| 69 | + restart: unless-stopped |
| 70 | + environment: |
| 71 | + RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-} |
| 72 | + RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-} |
| 73 | + volumes: |
| 74 | + - ./rabbitmq.advanced.config:/etc/rabbitmq/advanced.config:ro |
| 75 | + worker: |
| 76 | + image: dsarchive/wsi_deid:latest |
| 77 | + # Set DSA_USER to a user id that is part of the docker group (e.g., |
| 78 | + # `DSA_USER=$(id -u):$(id -g)`). This provides permissions to manage |
| 79 | + # docker |
| 80 | + environment: |
| 81 | + DSA_USER: ${DSA_USER:-} |
| 82 | + PROVISION: worker |
| 83 | + C_FORCE_ROOT: true |
| 84 | + restart: unless-stopped |
| 85 | + volumes: |
| 86 | + # Needed to use slicer_cli_web to run docker containers |
| 87 | + - /var/run/docker.sock:/var/run/docker.sock |
| 88 | + # Needed to allow transferring data to slicer_cli_web docker containers |
| 89 | + - ${TMPDIR:-/tmp}:${TMPDIR:-/tmp} |
| 90 | + - ./worker.local.cfg:/venv/lib/python3.11/site-packages/girder_worker/worker.local.cfg |
| 91 | + depends_on: |
| 92 | + - rabbitmq |
| 93 | + command: bash -c "C_FORCE_ROOT=true PROVISION=worker python /conf/provision.py && python -m girder_worker --concurrency=1 -Ofair --prefetch-multiplier=1" |
| 94 | + |
| 95 | +volumes: |
| 96 | + dbdata: |
| 97 | + fsdata: |
| 98 | + logs: |
0 commit comments