mirror of https://github.com/commaai/openpilot.git
Simulator: fix port issues in devcontainer (#29977)
* fix sim devcontainer * use host.docker.internal instead * devcontainer supports jsonc
This commit is contained in:
parent
feeb827369
commit
1f8ceb4ca1
|
@ -9,3 +9,5 @@ RUN pip install ipython jupyter jupyterlab
|
|||
RUN cd $HOME && \
|
||||
curl -O https://raw.githubusercontent.com/commaai/agnos-builder/master/userspace/home/.tmux.conf && \
|
||||
curl -O https://github.com/commaai/agnos-builder/blob/master/userspace/home/.vimrc
|
||||
|
||||
ENV CARLA_HOST="host.docker.internal"
|
|
@ -18,7 +18,8 @@
|
|||
"--volume=${localEnv:HOME}/.comma:/root/.comma",
|
||||
"--volume=/tmp/comma_download_cache:/tmp/comma_download_cache",
|
||||
"--volume=/tmp/devcontainer_scons_cache:/tmp/scons_cache",
|
||||
"--shm-size=1G"
|
||||
"--shm-size=1G",
|
||||
"--add-host=host.docker.internal:host-gateway" // required to use host.docker.internal on linux
|
||||
],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
|
|
|
@ -10,6 +10,7 @@ repos:
|
|||
- id: check-ast
|
||||
exclude: '^(third_party)/'
|
||||
- id: check-json
|
||||
exclude: '.devcontainer/devcontainer.json' # this supports JSON with comments
|
||||
- id: check-toml
|
||||
- id: check-xml
|
||||
- id: check-yaml
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import os
|
||||
|
||||
from typing import Any
|
||||
from multiprocessing import Queue
|
||||
|
@ -19,7 +20,7 @@ def parse_args(add_args=None):
|
|||
# Carla specific
|
||||
parser.add_argument('--town', type=str, default='Town04_Opt')
|
||||
parser.add_argument('--spawn_point', dest='num_selected_spawn_point', type=int, default=16)
|
||||
parser.add_argument('--host', dest='host', type=str, default='127.0.0.1')
|
||||
parser.add_argument('--host', dest='host', type=str, default=os.environ.get("CARLA_HOST", '127.0.0.1'))
|
||||
parser.add_argument('--port', dest='port', type=int, default=2000)
|
||||
|
||||
return parser.parse_args(add_args)
|
||||
|
|
Loading…
Reference in New Issue