Skip to content
Open
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
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,12 @@ uv sync
git clone https://github.com/MizuhoAOKI/python_simple_mppi.git
```

1. Run for the first time setup to build the docker image. Building the image might take a few minutes.
1. Run setup to build the docker image, launch the docker container and get into the bash inside. Building the image might take a few minutes.
```
cd <path to your workspace>/python_simple_mppi
docker build -t dev_mppi:v1.1 -f docker/Dockerfile .
```

1. Launch the docker container and get into the bash inside.
```
cd <path to your workspace>/python_simple_mppi
docker run -it -v .:/dev_ws/python_simple_mppi --name dev_mppi_container dev_mppi:v1.1 bash
docker compose run --rm dev
```
This command will automatically build the Docker image if needed.
Once the container starts, any changes made in the local repository on the host will be reflected inside the container, and vice versa.

</details>
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
dev:
build:
context: .
dockerfile: docker/Dockerfile
container_name: dev_mppi_container
image: dev_mppi:v1.1
volumes:
- .:/dev_ws/python_simple_mppi
stdin_open: true
tty: true
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

SHELL ["/bin/bash", "-c"]

# Set uv environment variables for production
ENV UV_PROJECT_ENVIRONMENT=/opt/venv
ENV UV_COMPILE_BYTECODE=0
ENV UV_LINK_MODE=hardlink

WORKDIR /dev_ws/python_simple_mppi
COPY . /dev_ws/python_simple_mppi

Expand Down