Comments (6)
I've been able to find a workaround by adding sudo rights to the user in the run.sh and launching with sudo:
#!/bin/bash
XSOCK=/tmp/.X11-unix
XAUTH=$HOME/.Xauthority
VOLUMES="--volume=$XSOCK:$XSOCK:rw
--volume=$XAUTH:$XAUTH:rw
--volume=$(pwd)/autoware-contents:/home/autoware/autoware-contents:ro"
RUNTIME=""
DOCKER_VERSION=$(docker version --format '{{.Client.Version}}' | cut --delimiter=. --fields=1,2)
if [[ $DOCKER_VERSION < "19.03" ]] && ! type nvidia-docker; then
RUNTIME="--gpus all"
else
RUNTIME="--runtime=nvidia"
fi
docker run \
-it --rm \
$VOLUMES \
--env="XAUTHORITY=${XAUTH}" \
--env="DISPLAY=${DISPLAY}" \
--privileged \
--net=host \
--user $(id -u ${USER}):$(id -g ${USER}) \
--group-add sudo \
$RUNTIME \
carla-autoware:latest
sudo ./run.sh
However, I agree with wuxiaohua1011 that the container should be adapted so that sudo is not required.
Hope that helps for now!
from carla-autoware.
I've been able to find a workaround by adding sudo rights to the user in the run.sh and launching with sudo:
#!/bin/bash XSOCK=/tmp/.X11-unix XAUTH=$HOME/.Xauthority VOLUMES="--volume=$XSOCK:$XSOCK:rw --volume=$XAUTH:$XAUTH:rw --volume=$(pwd)/autoware-contents:/home/autoware/autoware-contents:ro" RUNTIME="" DOCKER_VERSION=$(docker version --format '{{.Client.Version}}' | cut --delimiter=. --fields=1,2) if [[ $DOCKER_VERSION < "19.03" ]] && ! type nvidia-docker; then RUNTIME="--gpus all" else RUNTIME="--runtime=nvidia" fi docker run \ -it --rm \ $VOLUMES \ --env="XAUTHORITY=${XAUTH}" \ --env="DISPLAY=${DISPLAY}" \ --privileged \ --net=host \ --user $(id -u ${USER}):$(id -g ${USER}) \ --group-add sudo \ $RUNTIME \ carla-autoware:latest
sudo ./run.sh
However, I agree with wuxiaohua1011 that the container should be adapted so that sudo is not required.
Hope that helps for now!
Nice, it works great, thank you so much!
from carla-autoware.
Actually, I looked into this issue a bit, and it seems like this stack overflow says that you actually cannot start a docker at the root directory or something like that
https://stackoverflow.com/questions/40636618/how-to-start-a-chrooted-directory-as-a-docker-container
Which means that the docker file might have a small problem?
from carla-autoware.
I have the same problem.
from carla-autoware.
I also have same problem when run.sh is executed. I changed user as root before execution.
$ sudo su
$ ./run.sh
It did not works. Can you tell us how to solve it?
from carla-autoware.
Hi! The issue should be fixed now (#103). Feel free to re-open the issue if needed.
from carla-autoware.
Related Issues (20)
- Autoware warnings -- "base_link" passed to lookupTransform argument target_frame does not exist. Necessary topics are not subscribed yet ... HOT 2
- unable to launch carla-autoware agent
- YOLO not working. No image input HOT 3
- Unused args [sensor_height] for include of
- Sensors not bounded with Ego Vehicle HOT 1
- RLException: while processing
- Any plan on supporting CARLA 0.9.12?
- carla-autoware don't support carla version 0.9.13 HOT 2
- how can i change sensor position of the vehicle in carla
- CARLA-Autoware localization problem HOT 3
- rviz-carla-autoware
- Carla-Autoware controlling ego-vehicle HOT 10
- Controlling Carla-autoware Ego_Vehicle and carla Ego_Vehicle
- Executing Roslaunch commands inside a running container HOT 1
- No module named transforms3d.euler HOT 1
- Scenario Runner and Autoware HOT 1
- Sensor data and ackermann_control data in rosbag are not synchronized HOT 1
- Multiple sensor kits
- The npc in carla-autoware either not move or running in a very random manner
- cannot get eggfile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carla-autoware.