cromwell icon indicating copy to clipboard operation
cromwell copied to clipboard

Docker-compose cromwell can not use docker in WDL?

Open summerghw opened this issue 1 year ago • 0 comments

Hey develop team, thank you for develop this good software. I have built a cromwell by using docker-compose. here is my docker-compose.yml

services:
  cromwell:
    build: 
      context: ./compose/cromwell
    volumes:
      - ./cromwell-executions:/cromwell-working-dir/cromwell-executions
      - /data1:/data1
    command: ["/wait-for-it/wait-for-it.sh mysql-db:3306 -t 120 -- java -Dconfig.file=/app-config/cromwell-application.conf -jar /app/cromwell.jar server"]
    links:
      - mysql-db
    ports:
      - "80:8000"
  mysql-db:
    image: "mysql:5.7"
    environment:
      - MYSQL_ROOT_PASSWORD=cromwell
      - MYSQL_DATABASE=cromwell_db
    volumes:
      - ./compose/mysql/init:/docker-entrypoint-initdb.d
      - ./compose/mysql/data:/var/lib/mysql
    ports:
      - "3307:3306"

and here is my crowell config file:


# Note: If you spot a mistake in this configuration sample, please let us know by making an issue at:
# https://github.com/broadinstitute/cromwell/issues

call-caching {
  enabled = false
}

backend {
  default = "Local"
  providers {
    Local {
      actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory"
      config {
        run-in-background = true
        runtime-attributes = "String? docker Int? max_runtime = 2"
        submit = "/bin/bash ${script}"
        submit-docker = "docker run --rm -v ${cwd}:${docker_cwd} -i ${docker} /bin/bash < ${script}"

        # Root directory where Cromwell writes job results. This directory must be
        # visible and writeable by the Cromwell process as well as the jobs that Cromwell
        # launches.
        root: "cromwell-executions"

        filesystems {
          local {
            localization: [
              "soft-link", "hard-link", "copy"
            ]

            caching {
              duplication-strategy: [
                "soft-link"
              ]

              # Possible values: file, path
              # "file" will compute an md5 hash of the file content.
              # "path" will compute an md5 hash of the file path. This strategy will only be effective if the duplication-strategy (above) is set to "soft-link",
              # in order to allow for the original file path to be hashed.
              hashing-strategy: "path"

              # When true, will check if a sibling file with the same name and the .md5 extension exists, and if it does, use the content of this file as a hash.
              # If false or the md5 does not exist, will proceed with the above-defined hashing strategy.
              check-sibling-md5: false
            }
          }
        }
      }
    }
  }
}

database {
  db.url = "jdbc:mysql://mysql-db/cromwell_db?allowPublicKeyRetrieval=true&useSSL=false&rewriteBatchedStatements=true"
  db.user = "cromwell"
  db.password = "cromwell"
  db.driver = "com.mysql.cj.jdbc.Driver"
  profile = "slick.jdbc.MySQLProfile$"
  db.connectionTimeout = 15000
}

and here is my cormwell dockerfile:

FROM broadinstitute/cromwell:develop

RUN git clone https://github.com/vishnubob/wait-for-it.git
RUN mkdir cromwell-working-dir
WORKDIR cromwell-working-dir

COPY ./app-config /app-config

ENTRYPOINT ["/bin/sh", "-c"]

when i submit a wdl did not use docker it was ok. but when i submit a wdl need to use docker, a error apear.

/cromwell-working-dir/cromwell-executions/RNAseq/26e3c339-39d3-442f-b93e-8269dc7f9fa6/call-fastp_pe/shard-7/execution/script.submit: line 2: docker: command not found

Is that means I shoud install a docker deamon in cromwell dockerfile or i cloud change some config setting to fix this. please help.

summerghw avatar Feb 08 '23 07:02 summerghw