Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsu-Akatsuki committed Dec 4, 2024
1 parent ce89451 commit 2c1de28
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ After the image is built, you can run the container with the following command
# Please replace the image name with the name of the image you built or pulled
$ cd ~/rangenet/src/rangenet/docker/ubuntu20.04_cuda11.1.1_tensorrt10.6_noetic

# Please change the mount path in docker-compose.yml
$ docker compose up
# Open an another terminal
$ docker exec -it rangenet /bin/bash
Expand Down
11 changes: 5 additions & 6 deletions docker/generate_dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ def download_cmake():
f.write(f"{download_cmake()}\n")


def set_docker_compose(user_home, prefix):
def set_docker_compose(prefix):
return f"""services:
liobench:
image: rangenet:{prefix}
container_name: rangenet
volumes:
# Map host workspace to container workspace (Please change to your own path)
- {user_home}/rangenet:/home/rangenet/rangenet/:rw
- $HOME/rangenet:/home/rangenet/rangenet/:rw
- /tmp/.X11-unix:/tmp/.X11-unix:rw
deploy:
resources:
Expand All @@ -252,10 +252,10 @@ def set_docker_compose(user_home, prefix):
"""


def generate_docker_compose(target_dir, user_home, prefix):
def generate_docker_compose(target_dir, prefix):
target_path = target_dir / "docker-compose.yml"
with open(target_path, "w") as f:
f.write(f"{set_docker_compose(user_home, prefix)}")
f.write(f"{set_docker_compose(prefix)}")


def set_build_bash(prefix):
Expand Down Expand Up @@ -303,8 +303,7 @@ def main():
target_dir = target_dir / prefix

generate_dockerfile(ubuntu_version, ros_version, tensorrt_version, cuda_version, target_dir)
user_home = os.getenv("HOME")
generate_docker_compose(target_dir, user_home, prefix)
generate_docker_compose(target_dir, prefix)
generate_build_bash(target_dir, prefix)
generate_build_image_workflow(prefix)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
container_name: rangenet
volumes:
# Map host workspace to container workspace (Please change to your own path)
- /home/helios/rangenet:/home/rangenet/rangenet/:rw
- $HOME/rangenet:/home/rangenet/rangenet/:rw
- /tmp/.X11-unix:/tmp/.X11-unix:rw
deploy:
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
container_name: rangenet
volumes:
# Map host workspace to container workspace (Please change to your own path)
- /home/helios/rangenet:/home/rangenet/rangenet/:rw
- $HOME/rangenet:/home/rangenet/rangenet/:rw
- /tmp/.X11-unix:/tmp/.X11-unix:rw
deploy:
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
container_name: rangenet
volumes:
# Map host workspace to container workspace (Please change to your own path)
- /home/helios/rangenet:/home/rangenet/rangenet/:rw
- $HOME/rangenet:/home/rangenet/rangenet/:rw
- /tmp/.X11-unix:/tmp/.X11-unix:rw
deploy:
resources:
Expand Down

0 comments on commit 2c1de28

Please sign in to comment.