Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md for DockerHub and versions #72

Merged
merged 3 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 40 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ At the moment, MBARI WEC is supported by source installation only. Use Ubuntu Ja
cd ~/mbari_wec_ws/src
```

1. Clone all source repos with the help of `vcstool`:
2. Clone all source repos with the help of `vcstool`:

```
wget https://raw.githubusercontent.com/osrf/mbari_wec/main/mbari_wec_all.yaml
Expand All @@ -102,7 +102,7 @@ At the moment, MBARI WEC is supported by source installation only. Use Ubuntu Ja
export GZ_VERSION=garden
```

1. Install ROS dependencies
2. Install ROS dependencies

```
sudo pip3 install -U rosdep
Expand All @@ -111,33 +111,62 @@ At the moment, MBARI WEC is supported by source installation only. Use Ubuntu Ja
rosdep install --from-paths src --ignore-src -r -y -i
```

1. Build and install
3. Build and install

```
source /opt/ros/humble/setup.bash
cd ~/mbari_wec_ws
colcon build
```

## Using docker
## Using Docker
### Requirements

1. Install Docker using [installation instructions](https://docs.docker.com/engine/install/ubuntu/).

1. Complete the [Linux Postinstall steps](https://docs.docker.com/engine/install/linux-postinstall/) to allow you to manage Docker as a non-root user.
2. Complete the [Linux Postinstall steps](https://docs.docker.com/engine/install/linux-postinstall/) to allow you to manage Docker as a non-root user.

1. If you have an NVIDIA graphics card, it can help speed up rendering. Install [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker).
3. If you have an NVIDIA graphics card, it can help speed up rendering. Install [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker).

### Build
### Use Existing Image on DockerHub
MBARI maintains Docker images for the two most recent releases on their DockerHub:
- `mbari/mbari_wec:latest`
- `mbari/mbari_wec:previous`

1. Get `run.bash` script.

```
git clone -b main https://github.com/osrf/mbari_wec.git
cd ~/mbari_wec/docker/
```
Or
```
wget https://raw.githubusercontent.com/osrf/mbari_wec/main/docker/run.bash
chmod +x run.bash
```

3. Run the container

If you have an NVIDIA graphics card
```
./run.bash mbari/mbari_wec:latest
```
Otherwise
```
./run.bash mbari/mbari_wec:latest --no-nvidia
```

### Build from Dockerfile
An alternative to using the images from MBARI's DockerHub would be to build from a Dockerfile. This is convenient if you would like to make any changes.

1. Clone the mbari_wec repository to download the latest Dockerfile.

```
git clone https://github.com/osrf/mbari_wec.git
git clone -b main https://github.com/osrf/mbari_wec.git
cd ~/mbari_wec/docker/
```

1. Build the docker image
2. Build the docker image

If you have an NVIDIA graphics card
```
Expand All @@ -149,7 +178,7 @@ At the moment, MBARI WEC is supported by source installation only. Use Ubuntu Ja
./build.bash mbari_wec --no-nvidia
```

1. Run the container
3. Run the container

If you have an NVIDIA graphics card
```
Expand All @@ -160,7 +189,7 @@ At the moment, MBARI WEC is supported by source installation only. Use Ubuntu Ja
./run.bash mbari_wec --no-nvidia
```

1. To have another window running the same docker container, run this command in a new terminal:
4. To have another window running the same docker container, run this command in a new terminal:

```
./join.bash mbari_wec
Expand Down
101 changes: 66 additions & 35 deletions docs/docs/Tutorials/Install/Install_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,86 @@ Docker images that include the neccessary software and dependencies have been cr

1. If you have an NVIDIA graphics card, it can help speed up rendering. Install [nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker).

## Build
### Use Existing Image on DockerHub
MBARI maintains Docker images for the two most recent releases on their DockerHub:
- `mbari/mbari_wec:latest`
- `mbari/mbari_wec:previous`

1. Get `run.bash` script.

```
git clone -b main https://github.com/osrf/mbari_wec.git
cd ~/mbari_wec/docker/
```
Or
```
wget https://raw.githubusercontent.com/osrf/mbari_wec/main/docker/run.bash
chmod +x run.bash
```

3. Run the container

If you have an NVIDIA graphics card
```
./run.bash mbari/mbari_wec:latest
```
Otherwise
```
./run.bash mbari/mbari_wec:latest --no-nvidia
```

### Build from Dockerfile
An alternative to using the images from MBARI's DockerHub would be to build from a Dockerfile. This is convenient if you would like to make any changes.

1. Clone the mbari_wec repository to download the latest Dockerfile.
```
git clone https://github.com/osrf/mbari_wec.git
cd ~/mbari_wec/docker/
```

1. Build the docker image
```
git clone -b main https://github.com/osrf/mbari_wec.git
cd ~/mbari_wec/docker/
```

If you have an NVIDIA graphics card
```
./build.bash nvidia_opengl_ubuntu22
./build.bash buoy
```
Otherwise
```
./build.bash buoy --no-nvidia
```
2. Build the docker image

1. Run the container
If you have an NVIDIA graphics card
```
./build.bash nvidia_opengl_ubuntu22
./build.bash mbari_wec
```
Otherwise
```
./build.bash mbari_wec --no-nvidia
```

If you have an NVIDIA graphics card
```
./run.bash buoy
```
Otherwise
```
./run.bash buoy --no-nvidia
```
3. Run the container

1. To have another window running the same docker container, run this command in a new terminal:
```
./join.bash buoy
```
If you have an NVIDIA graphics card
```
./run.bash mbari_wec
```
Otherwise
```
./run.bash mbari_wec --no-nvidia
```

4. To have another window running the same docker container, run this command in a new terminal:

```
./join.bash mbari_wec
```

## Quick start
### Quick start

Quick start scripts are provided in the home directory:

This sources the compiled workspace:
```
./setup.bash
```
```
. setup.bash
```

This sources the compiled workspace and launches the simulation:
```
./run_simulation.bash
```
```
./run_simulation.bash
```

## Run an example to test

Expand Down
Loading