ipython2cwl icon indicating copy to clipboard operation
ipython2cwl copied to clipboard

NetworkRequirement is disable by default.

Open mosoriob opened this issue 4 years ago • 0 comments

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

mosoriob avatar May 11 '21 23:05 mosoriob