首页 > 其他分享 >Carla Docker 安装

Carla Docker 安装

时间:2023-10-21 14:48:19浏览次数:36  
标签:run -- sudo apt Carla nvidia docker 安装 Docker

CARLA in Docker - CARLA Simulator

Install Docker Engine on Ubuntu | Docker Documentation

sudo usermod -aG docker vipuser
newgrp docker

0. miniconda 安装

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sudo chmod +x Miniconda3-latest-Linux-x86_64.sh
sudo ./Miniconda3-latest-Linux-x86_64.sh
sudo chmod a+w .conda
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

1. Docker 安装

sudo apt-get update
sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo docker run hello-world
加速
vim /etc/docker/daemon.json

{
	"registry-mirrors": [
		"https://registry.docker-cn.com",
		"http://hub-mirror.c.163.com",
		"https://docker.mirrors.ustc.edu.cn"
	]
}

2. NVIDIA Container Toolkit 安装

(36条消息) Ubuntu安装Nvidia Container Toolkit_八面受敌的博客-CSDN博客_ubuntu nvidia-container-toolkit

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list \
   && curl -s -L https://nvidia.github.io/nvidia-container-runtime/experimental/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker
sudo docker run --rm --gpus all nvidia/cuda:10.0-base nvidia-smi

3. Carla 镜像

# Pull the latest image
docker pull carlasim/carla:latest

# Pull a specific version
docker pull carlasim/carla:0.9.12

CARLA 0.9.12

To run CARLA with a display:

sudo docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:0.9.12 /bin/bash ./CarlaUE4.sh

To run CARLA in off-screen mode:

sudo docker run --privileged --gpus all --net=host -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.12 /bin/bash ./CarlaUE4.sh -RenderOffScreen

CARLA 0.9.7 to 0.9.11

To run CARLA using Vulkan:

sudo docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY -e SDL_VIDEODRIVER=x11 -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.11 /bin/bash ./CarlaUE4.sh -vulkan <-additonal-carla-flags>

Note

This command will allow you to run the CARLA image with Vulkan as long as your machine has a display. See the rendering documentation for information on running with Vulkan in off-screen mode.

To run CARLA using OpenGL:

docker run -e DISPLAY=$DISPLAY --net=host --gpus all --runtime=nvidia carlasim/carla:<version> /bin/bash Ca

其他

cuda和cudnn的配置

把cuda的nvcc加入环境变量:
export PATH=$PATH:/usr/local/cuda/bin

conda install cudatoolkit=10.0 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64/
conda install cudnn=7 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/

标签:run,--,sudo,apt,Carla,nvidia,docker,安装,Docker
From: https://www.cnblogs.com/grain-rain/p/17778947.html

相关文章

  • go mod tidy总是安装最新依赖,如何查找哪个模块导致某个包安装最新依赖,提供一个小工具
    安装:goinstallgithub.com/jan-bar/interesting/findModVer@latest执行:findModVerd:\myproject结果如下图所示:根据结果可以找到哪个依赖导致google.golang.org/grpcv1.45.0使用了这个版本,这样每次执行gomodtidy会自动修改该模块到v1.45.0版本。我看了下github.com/spf1......
  • 部署linux网络安装服务器
    一、批量部署概述什么是PXE预启动执行环境(PXE)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivialfiletransferprotocol)或MTFTP(multicast......
  • linux内核编译安装(Ubuntu替换内核)
    前言:Ubuntu替换内核一般是不会删除自己Ubuntu里面的东西的(只是内核改变,其它影响,放心搞就是了,而且可以变回原来的内核)实验环境:OS:Ubuntu20.04.2LTSOldKernel:linux5.15.0NewKernel:linux5.15.0(我测试过的只有原版本,升级其它版本试了不能开机)注:查看当前内核版本命令"uname......
  • NGINX 安装 SSL 证书 - 开启 HTTPS 访问
    在NGINX上安装SSL证书-开启HTTPS访问一、在你开始之前请确保您已下载证书文件。没有证书?请从https://www.sslforfree.com上申请90天免费证书。下载证书后,您应该有一个包含以下证书文件的ZIP:certificate.crtca_bundle.crtprivate.key二、上传证书文件首先,......
  • docker
    Docker概述docker官网:https://www.docker.com/docker官方文档:https://docs.docker.com/仓库地址:https://hub.docker.com/隔离性:docker每个容器都是相互隔离的,当一个容器出现问题,并不会影响到其他容器。轻量级:docker基于半解耦,有namespace(名称空间)六项隔离。并不是完全型解......
  • MacOS安装on-my-zsh
    1.on-my-zsh安装1.1.使用curl方式安装1.1.1官方镜像源sh-c"$(curl-fsSLhttps://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"1.1.2国内Gitee加速源sh-c"$(curl-fsSLhttps://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh......
  • Docker启动失败,报错Cannot connect to the Docker daemon at unix:///var/run/docker
    问题描述:CannotconnecttotheDockerdaemonatunix:///var/run/docker.sock.Isthedockerdaemonrunning?首次安装docker后,服务没有自启动解决方案:查看docker状态 1servicedockerstatus 设置开启Linux时docker自启动 1systemctlenabledocker   然后......
  • Docker启动报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock
    问题描述:  Docker启动报错:CannotconnecttotheDockerdaemonatunix:///var/run/docker.sock.Isthedockerdaemonrunning?  CannotconnecttotheDockerdaemonatunix:///var/run/docker.sock.Isthedockerdaemonrunning?输入dockerps命令无法显示服......
  • docker cp 命令 - 宿主机与容器互相拷贝文件
    一、从容器拷贝文件到宿主机命令格式:$dockercp<containder-id>:/path/host/path例子:$dockercpc9b7f17d43e9:/opt/hello.txt/home/hello.txt二、从宿主机拷贝文件到容器命令格式:$dockercp/host/path<containder-id>:/path例子:$dockercp/home/hel......
  • ModelSim 安装指南
    转载请标明出处:https://www.cnblogs.com/leedsgarden/p/17778527.html免费版可以满足大部分Verilog教学,本文介绍的是ModelSim的免费版如果有FPGA需求的,推荐使用SE版本破解安装下载页面下载对应的windows版本或者Linux版本,启动安装程序后一路默认即可。(注意留意......