Skip to content

Docker command/networking does not work under Linux #3

Description

@jaanisfehling

The docker command that works for me on Linux (NixOS) is this:

docker run \
  --device nvidia.com/gpu=all \
  --network=host \
  --shm-size=512m \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v $(pwd):/workspace \
  -it \
  --rm \
  -w /workspace/agent \
  vtprl:py310 bash

Note the --network=host. This means ip_address parameter can be set to 127.0.0.1 so the simulator listens on this address and the agent connects to this address.
If using dockers network, the agent would need to connect to host.docker.internal(to connect to the host machine), and the host would need to listen to 0.0.0.0 to allow connections from the docker network. This does not work with the current config implementation because the address is shared bx agent and simulator.

Also, the --gpus all had to be changed to --device nvidia.com/gpu=all.

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