Dockerfile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. FROM carlasim/carla:0.9.13
  2. # CMD ['/bin/sh','-c','/bin/bash']
  3. # 添加环境变量
  4. # export XDG_RUNTIME_DIR=/usr/lib/
  5. # export RUNLEVEL=3
  6. ENV XDG_RUNTIME_DIR=/usr/lib/
  7. ENV RUNLEVEL=3
  8. USER root
  9. RUN rm /etc/apt/sources.list.d/cuda.list
  10. RUN rm /etc/apt/sources.list.d/nvidia-ml.list
  11. RUN apt-key del 7fa2af80
  12. RUN sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  13. RUN apt-get update && apt-get install -y --no-install-recommends wget
  14. RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb
  15. RUN dpkg -i cuda-keyring_1.0-1_all.deb
  16. # 设置清华源
  17. RUN apt-get update
  18. RUN apt-get install xdg-user-dirs
  19. RUN apt-get install nano sudo curl -y
  20. RUN apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev mesa-utils -y
  21. RUN apt-get install libxtst6 libxv1 libegl1-mesa -y
  22. RUN wget https://sourceforge.net/projects/virtualgl/files/3.0.1/virtualgl_3.0.1_amd64.deb
  23. RUN dpkg -i virtualgl_3.0.1_amd64.deb
  24. RUN apt-get update
  25. RUN apt-get -f install
  26. # 安装conda
  27. # yhyu13 : install additional packages
  28. # 设置apt的源为tsinghua镜像源
  29. RUN sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  30. RUN apt-get update && apt-get install -y curl wget
  31. # 安装conda
  32. RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
  33. && bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda \
  34. && rm Miniconda3-latest-Linux-x86_64.sh
  35. RUN /opt/conda/bin/conda update -n base -c defaults conda
  36. RUN /opt/conda/bin/conda create -n py38 python=3.8.5 -y
  37. ENV PATH /opt/conda/envs/py38/bin:$PATH
  38. COPY requirements.txt requirements.txt
  39. RUN pip install -r requirements.txt
  40. # RUN wget http://download.nvidia.com/XFree86/Linux-x86_64/450.57/NVIDIA-Linux-x86_64-450.57.run
  41. # RUN sudo /bin/bash NVIDIA-Linux-x86_64-450.57.run --accept-license --no-questions --ui=none
  42. # RUN sudo apt-get install -y xserver-xorg mesa-utils libvulkan1
  43. # RUN sudo nvidia-xconfig --preserve-busid -a --virtual=1280x1024
  44. # RUN ENV SDL_VIDEODRIVER=x11
  45. # RUN sudo X :0 &
  46. RUN apt install vulkan-utils
  47. USER carla
  48. # WORKDIR /home/vangogh/software/FuzzScene
  49. # COPY code/env/carla.yml /home/vangogh/software/FuzzScene/code/env/carla.yml
  50. # COPY code/env/dave.yml /home/vangogh/software/FuzzScene/code/env/dave.yml
  51. # RUN /opt/conda/bin/conda env create -f code/env/carla.yml
  52. # /opt/conda/bin/conda env create -f code/env/dave.yml
  53. COPY . .
  54. # CMD ["/home/carla/CarlaUE4.sh -opengl"]
  55. # CMD ["./CarlaUE4.sh","-opengl"]