Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
turtlebot4
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
robohub
turtlebot4
Commits
d0327b45
Commit
d0327b45
authored
4 months ago
by
awerner
Browse files
Options
Downloads
Patches
Plain Diff
first version for podman
parent
04f06109
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
docker/Makefile
+2
-2
2 additions, 2 deletions
docker/Makefile
docker/docker_entrypoint.sh
+1
-1
1 addition, 1 deletion
docker/docker_entrypoint.sh
robot.env
+1
-1
1 addition, 1 deletion
robot.env
start.sh
+4
-21
4 additions, 21 deletions
start.sh
vpn/vpn.sh
+1
-2
1 addition, 2 deletions
vpn/vpn.sh
with
9 additions
and
27 deletions
docker/Makefile
+
2
−
2
View file @
d0327b45
...
...
@@ -4,6 +4,6 @@ push:
docker push git.uwaterloo.ca:5050/robohub/turtlebot4:latest
image
:
docker
pull ubuntu:jammy
docker
build
--network
=
host
-t
git.uwaterloo.ca:5050/robohub/turtlebot4:latest
${
CURDIR
}
podman
pull ubuntu:jammy
podman
build
--network
=
host
-t
git.uwaterloo.ca:5050/robohub/turtlebot4:latest
${
CURDIR
}
This diff is collapsed.
Click to expand it.
docker/docker_entrypoint.sh
+
1
−
1
View file @
d0327b45
...
...
@@ -46,7 +46,7 @@ for file in /dev/video*; do
done
# allow graphics card access
for
file
in
/dev/dri/
*
;
do
chmod
a+rwx
$file
chmod
a+rwx
$file
||
echo
"Failed to set permissions on
$file
"
done
# show ip address on stdout
...
...
This diff is collapsed.
Click to expand it.
robot.env
+
1
−
1
View file @
d0327b45
ROBOTNAME=turtlebot
DOCKER_ROBOT_FLAGS="
--ulimit rtprio=99:99 --ulimit memlock=102400:102400
"
DOCKER_ROBOT_FLAGS=""
if [ -e /dev/input/spacemouse ]; then
DOCKER_ROBOT_FLAGS="$DOCKER_ROBOT_FLAGS --device /dev/input/spacemouse"
...
...
This diff is collapsed.
Click to expand it.
start.sh
+
4
−
21
View file @
d0327b45
...
...
@@ -41,23 +41,15 @@ fi
# Settings required for having nvidia GPU acceleration inside the docker
DOCKER_X11_ARGS
=
"--env DISPLAY --ipc=host --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw"
which nvidia-docker
>
/dev/null 2> /dev/null
HAS_NVIDIA_DOCKER
=
$?
if
[
$HAS_NVIDIA_DOCKER
-eq
0
]
;
then
DOCKER_COMMAND
=
nvidia-docker
DOCKER_GPU_ARGS
=
"
$DOCKER_GPU_ARGS
--env NVIDIA_VISIBLE_DEVICES=all --env NVIDIA_DRIVER_CAPABILITIES=all"
else
#echo "Running without nvidia-docker, if you have an NVidia card you may need it"\
#"to have GPU acceleration"
DOCKER_COMMAND
=
docker
fi
DOCKER_COMMAND
=
podman
DOCKER_GPU_ARGS
=
"
$DOCKER_GPU_ARGS
--device=nvidia.com/gpu=all --security-opt=label=disable"
xhost +
#ADDITIONAL_FLAGS="--detach"
ADDITIONAL_FLAGS
=
"--rm --interactive --tty"
ADDITIONAL_FLAGS
=
"
$ADDITIONAL_FLAGS
--device /dev/dri:/dev/dri
--volume=/run/udev:/run/udev"
ADDITIONAL_FLAGS
=
"
$ADDITIONAL_FLAGS
--volume=/run/udev:/run/udev"
# forward joystick/spacemouse input device
if
[
-e
/dev/input/js0
]
;
then
...
...
@@ -90,15 +82,6 @@ if [ -z "${CONTAINER_NAME}" ]; then
CONTAINER_NAME
=
uw_
${
ROBOTNAME
}
_
${
USER
}
fi
docker network
ls
|
grep
-q
${
CONTAINER_NAME
}
||
docker network create
${
CONTAINER_NAME
}
if
[
-f
/run/NetworkManager/resolv.conf
]
;
then
DOCKER_DNS_ARGS
=
"--dns=
$(
cat
/run/NetworkManager/resolv.conf |
grep
nameserver |
sed
-s
"s/nameserver //"
|
head
-n
1
)
"
elif
[
-f
/run/resolvconf/resolv.conf
]
;
then
DOCKER_DNS_ARGS
=
"--dns=
$(
cat
/run/resolvconf/resolv.conf |
grep
nameserver |
sed
-s
"s/nameserver //"
|
head
-n
1
)
"
else
DOCKER_DNS_ARGS
=
"--dns=8.8.8.8"
fi
if
!
docker container ps |
grep
-q
${
CONTAINER_NAME
}
;
then
echo
"Starting new container with name:
${
CONTAINER_NAME
}
"
$DOCKER_COMMAND
run
\
...
...
@@ -114,8 +97,8 @@ if ! docker container ps | grep -q ${CONTAINER_NAME}; then
--cap-add
=
NET_ADMIN
\
--device
/dev/bus/usb
\
--device
/dev/net
\
--network
=
slirp4netns
\
$DOCKER_DNS_ARGS
\
--network
${
CONTAINER_NAME
}
\
$IMAGE_NAME
else
echo
"Starting shell in running container"
...
...
This diff is collapsed.
Click to expand it.
vpn/vpn.sh
+
1
−
2
View file @
d0327b45
...
...
@@ -5,7 +5,6 @@ if [ -z "$1" ]; then
exit
1
fi
set
-e
ping
-c
1
-w
10 robohub.eng.uwaterloo.ca
>
/dev/null
||
(
echo
-e
"
\e
[31mCould not ping srv, check your network connections
\e
[39m"
;
exit
1
)
echo
"Remote reachable"
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null
&&
pwd
)
"
...
...
@@ -36,6 +35,6 @@ function cleanup()
trap
"cleanup"
SIGINT SIGTERM
echo
"Enter your UW credentials next"
chmod
go-rwx client.key
sudo
chmod
go-rwx client.key
sudo
LD_LIBRARY_PATH
=
${
LD_LIBRARY_PATH
}
$(
which openvpn
)
--config
turtlebot-tap.conf
--setenv
SETTINGS
$tmpfile
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment