Skip to content

NetworkRequirement is disable by default. #26

@mosoriob

Description

@mosoriob

The container doesn't have a network by default.

This can be a problem for a notebook that needs to connect to an API, etc.

$ ➜  ~ cwltool main.cwl values.yml 
INFO /var/lib/mfosorio/.pyenv/versions/3.8.6/bin/cwltool 3.0.20200706173533
INFO Resolved 'main.cwl' to 'file:///var/lib/mfosorio/main.cwl'
INFO [job main.cwl] /tmp/kupk_eno$ docker \
    run \
    -i \
    --mount=type=bind,source=/tmp/kupk_eno,target=/flioxh \
    --mount=type=bind,source=/tmp/yd49s0sy,target=/tmp \
    --mount=type=bind,source=/tmp/tmpabomgfk0,target=/var/lib/cwl/stg30c91233-2f1a-4496-a669-8905d4964c59/model.tflite,readonly \
    --workdir=/flioxh \
    --read-only=true \
    --net=none \
    --user=10004:20163 \
    --rm \
    --env=TMPDIR=/tmp \
    --env=HOME=/flioxh \
    --cidfile=/tmp/h555rod9/20210511160016-960586.cid \
    r2d-2ftmp-2frepo2cwl-5fcr38hhip-2frepo1620766586 \
    /app/cwl/bin/main \
    -- \
    --cameraType \
    0 \
    --modelPath \
    /var/lib/cwl/stg30c91233-2f1a-4496-a669-8905d4964c59/model.tflite \
    --siteID \
    0

The solution is to add the NetworkAccess as requirements

requirements:
  NetworkAccess:
    networkAccess: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions