update docker
This commit is contained in:
Родитель
e76591424d
Коммит
9e8711092f
|
@ -32,8 +32,6 @@ RUN sudo chown -R airsim_user /home/airsim_user
|
|||
|
||||
RUN git clone https://github.com/microsoft/AirSim-Drone-Racing-Lab && \
|
||||
cd AirSim-Drone-Racing-Lab && \
|
||||
bash download_training_binaries.sh && \
|
||||
bash download_qualification_binaries.sh && \
|
||||
mv AirSim_Training/ ../ && \
|
||||
mv AirSim_Qualification/ ../ && \
|
||||
bash download_binaries.sh && \
|
||||
mv ADRL/ ../ && \
|
||||
cd ../
|
|
@ -21,16 +21,16 @@ def main(args):
|
|||
docker_image_builder.build_docker_image()
|
||||
|
||||
if __name__=="__main__":
|
||||
parser = ArgumentParser(description='AirSim Neurips-Game-of-Drones docker image builder')
|
||||
parser = ArgumentParser(description='AirSim Drone Racing Lab docker image builder')
|
||||
parser.add_argument('--dockerfile', type=str, default='Dockerfile', help='path to docker file')
|
||||
parser.add_argument('--base_image', type=str, default="nvidia/cudagl:10.0-devel-ubuntu18.04", help='base image name AND tag, on top of which the target image is built')
|
||||
parser.add_argument('--target_image', type=str, help='desired name of target image name AND tag')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# if a target image name is not specified, let's call it airsim_neurips:SOURCE_IMAGE_TAG
|
||||
# if a target image name is not specified, let's call it adrl:SOURCE_IMAGE_TAG
|
||||
if not args.target_image:
|
||||
target_image_tag = args.base_image.split(":")[1]
|
||||
args.target_image = 'airsim_neurips' + ':' + target_image_tag
|
||||
args.target_image = 'adrl' + ':' + target_image_tag
|
||||
|
||||
main(args)
|
|
@ -3,30 +3,23 @@
|
|||
# **Usage**
|
||||
# - for running default image, training binaries, in windowed mode:
|
||||
# `$ ./run_docker_image.sh "" training`
|
||||
# - for running default image, qualification binaries, in windowed mode:
|
||||
# `$ ./run_docker_image.sh "" qualification`
|
||||
# - for running default image, training binaries, in headless mode:
|
||||
# `$ ./run_docker_image.sh "" training headless`
|
||||
# - for running default image, qualification binaries, in headless mode:
|
||||
# `$ ./run_docker_image.sh "" qualification headless`
|
||||
# - for running a custom image in windowed mode, pass in you image name and tag:
|
||||
# `# $ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG`
|
||||
# `$ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG`
|
||||
# - for running a custom image in headless mode, pass in you image name and tag, followed by "headless":
|
||||
# # $ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG headless
|
||||
# `$ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG headless`
|
||||
|
||||
# This script takes three optional arguments
|
||||
# This script takes two optional arguments
|
||||
|
||||
# 1st argument is the name (and tag) of the dockerfile to run
|
||||
# by default, it is set to "airsim_neurips:10.0-devel-ubuntu18.04"
|
||||
# by default, it is set to "adrl:10.0-devel-ubuntu18.04"
|
||||
# else user can specify a docker image as follows:
|
||||
# $ ./run_docker_image.sh DOCKER_IMAGE_NAME:TAG
|
||||
DOCKER_IMAGE_NAME=${1:-airsim_neurips:10.0-devel-ubuntu18.04}
|
||||
DOCKER_IMAGE_NAME=${1:-adrl:10.0-devel-ubuntu18.04}
|
||||
|
||||
# 2nd argument: can be "training" or "qualification"
|
||||
TRAINING_OR_QUALIFICATION=${2:-training}
|
||||
|
||||
# 3rd argument: if user passes "headless", binary runs in headless mode
|
||||
IS_HEADLESS=${3:-notheadless}
|
||||
# 2nd argument: if user passes "headless", binary runs in headless mode
|
||||
IS_HEADLESS=${2:-notheadless}
|
||||
|
||||
# this block is for running X apps in docker
|
||||
XAUTH=/tmp/.docker.xauth
|
||||
|
@ -43,22 +36,18 @@ then
|
|||
fi
|
||||
|
||||
# per use the following commented out code for different options
|
||||
if [[ $2 = "training" ]]; then
|
||||
UNREAL_BINARY_COMMAND="bash /home/airsim_user/AirSim_Training/AirSimExe.sh -windowed -opengl"
|
||||
elif [[ $2 = "qualification" ]]; then
|
||||
UNREAL_BINARY_COMMAND="bash /home/airsim_user/AirSim_Qualification/AirSimExe.sh -windowed -opengl"
|
||||
fi
|
||||
UNREAL_BINARY_COMMAND="bash /home/airsim_user/ADRL/ADRL.sh -windowed -opengl"
|
||||
|
||||
# eleminate terminal output and run airsim process in the background
|
||||
# UNREAL_BINARY_COMMAND="bash /home/airsim_user/AirSim_Training/AirSimExe.sh -windowed -opengl &>/dev/null &"
|
||||
# UNREAL_BINARY_COMMAND="bash /home/airsim_user/ADRL/ADRL.sh -windowed -opengl &>/dev/null &"
|
||||
|
||||
# set window resolution
|
||||
# UNREAL_BINARY_COMMAND="/home/airsim_user/AirSim_Training -windowed -ResX=1080 -ResY=720"
|
||||
# UNREAL_BINARY_COMMAND="/home/airsim_user/ADRL/ADRL.sh -windowed -ResX=1080 -ResY=720"
|
||||
|
||||
# now, let's check if we need to run in headless mode or not
|
||||
# set SDL_VIDEODRIVER_VALUE to '' if windowed mode, 'offscreen' if headless mode
|
||||
SDL_VIDEODRIVER_VALUE='';
|
||||
if [[ $3 = "headless" ]]; then
|
||||
if [[ $2 = "headless" ]]; then
|
||||
SDL_VIDEODRIVER_VALUE='offscreen';
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
wget -c https://github.com/microsoft/AirSim-Drone-Racing-Lab/releases/download/v1.0-linux/ADRL.zip
|
||||
unzip AirSim-Drone-Racing-Lab.zip;
|
||||
rm AirSim-Drone-Racing-Lab.zip;
|
||||
unzip ADRL.zip;
|
||||
rm ADRL.zip;
|
||||
|
||||
mkdir -p /home/$USER/Documents/AirSim;
|
||||
wget --directory-prefix=/home/$USER/Documents/AirSim -c https://github.com/microsoft/AirSim-Drone-Racing-Lab/releases/download/v1.0-linux/settings.json;
|
Загрузка…
Ссылка в новой задаче