Add dynamic docker file configuration

This commit is contained in:
Andrew Johnson
2025-10-07 06:51:46 +02:00
parent 095ffb467c
commit c56ffd185f
9 changed files with 533 additions and 22 deletions

View File

@@ -8,29 +8,55 @@ In the repo there is the simulation server along with a client class that can be
## Setup
### Option 1: Dev Container (Recommended)
The easiest way to get started is using the provided dev container which includes all dependencies and GUI support:
1. **Setup the dev container for your platform:**
```bash
.devcontainer/setup.sh
```
This will auto-detect your platform (macOS, Linux, Windows, WSL) and generate the appropriate `devcontainer.json`.
2. **Open in VS Code:**
- Install the "Dev Containers" extension
- Open Command Palette (Cmd/Ctrl + Shift + P)
- Run "Dev Containers: Reopen in Container"
3. **Platform-specific requirements:**
- **macOS**: Install XQuartz (`brew install --cask xquartz`) and run `xhost +localhost`
- **Linux**: X11 forwarding should work out of the box
- **Windows**: Access GUI via VNC at `http://localhost:5901` (password: `vncpass`)
### Option 2: Manual Setup
If you prefer to set up the environment manually:
1. Create the virtual environment by running:
```bash
python3 -m venv venv
```
```bash
python3 -m venv venv
```
2. Activate the virtual environment by running:
```bash
source venv/bin/activate
```
```bash
source venv/bin/activate
```
3. Install the required packages by running:
```bash
pip install -r requirements.txt
```
```bash
pip install -r requirements.txt
```
4. Export the python path by running:
```bash
export PYTHONPATH=$PWD
```
```bash
export PYTHONPATH=$PWD
```
## Running the simulation
@@ -41,6 +67,6 @@ To run the simulation, run the following command:
python tello_sim/run_sim.py
```
You can try running some of the [examples](./examples) to see how the simulation works. The examples are located in the `examples` folder.
You can try running some of the [examples](./examples) to see how the simulation works. The examples are located in the `examples` folder.
Or use the [client](./tello_sim/tello_sim_client.py) class to interact with the simulation server. The client class is located in the `tello_sim` folder.