-
Notifications
You must be signed in to change notification settings - Fork 195
/
Copy pathmake_docker.sh
executable file
·42 lines (33 loc) · 1.37 KB
/
make_docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
export CARLA_ROOT=/path/to/CARLA
export SCENARIO_RUNNER_ROOT=/path/to/scenario_runner
export LEADERBOARD_ROOT=/path/to/leaderboard
export TEAM_CODE_ROOT=/path/to/team_code_transfuser
export PYTHONPATH="${CARLA_ROOT}/PythonAPI/carla/":"${SCENARIO_RUNNER_ROOT}":"${LEADERBOARD_ROOT}":${PYTHONPATH}
if [ -z "$CARLA_ROOT" ]
then
echo "Error $CARLA_ROOT is empty. Set \$CARLA_ROOT as an environment variable first."
exit 1
fi
if [ -z "$SCENARIO_RUNNER_ROOT" ]
then echo "Error $SCENARIO_RUNNER_ROOT is empty. Set \$SCENARIO_RUNNER_ROOT as an environment variable first."
exit 1
fi
if [ -z "$LEADERBOARD_ROOT" ]
then echo "Error $LEADERBOARD_ROOT is empty. Set \$LEADERBOARD_ROOT as an environment variable first."
exit 1
fi
if [ -z "$TEAM_CODE_ROOT" ]
then echo "Error $TEAM_CODE_ROOT is empty. Set \$TEAM_CODE_ROOT as an environment variable first."
exit 1
fi
mkdir -p .tmp
cp -fr ${CARLA_ROOT}/PythonAPI .tmp
mv .tmp/PythonAPI/carla/dist/carla*-py2*.egg .tmp/PythonAPI/carla/dist/carla-leaderboard-py2.7.egg
mv .tmp/PythonAPI/carla/dist/carla*-py3*.egg .tmp/PythonAPI/carla/dist/carla-leaderboard-py3x.egg
cp -fr ${SCENARIO_RUNNER_ROOT}/ .tmp
cp -fr ${LEADERBOARD_ROOT}/ .tmp
cp -fr ${TEAM_CODE_ROOT}/ .tmp/team_code
# build docker image
docker build --force-rm --network host -t transfuser-agent -f ${LEADERBOARD_ROOT}/scripts/Dockerfile.master .
rm -fr .tmp