# Export from prebuilt docker image

## Prerequisites

* NVIDIA Docker 2

Make sure the ue4-ci-helpers package is up to date

```
pip install --upgrade ue4-ci-helpers
pip install ue4-docker
```

## Build the ue4-full image

<https://adamrehn.com/docs/ue4-docker/use-cases/linux-installed-builds>

## Build the deepdriveio/ue4-deepdrive-deps image

<https://github.com/deepdrive/ue4-deepdrive-deps>

## Export Unreal to your local filesystem

```
ue4-docker export installed deepdriveio/ue4-deepdrive-deps:latest ~/UnrealInstalled
```

Set the default version of Unreal with the [ue4cli](https://pypi.org/project/ue4cli/)

```
ue4 setroot ~/UnrealInstalled
```

## Build and run the project against the exported UnrealEngine

Now you're ready to build and run the project. This is what you'll do any time you've pulled in the latest changes from GitHub as well.

Download maps

```
python Packaging/package.py --download-jamestown
```

### Clean and build

Do the following the first time you export or anytime you pull latest from deepdrive-sim.

#### Clean your deepdrive-sim project directory to clear any stale build data

```
./clean_all.sh
```

#### Build and run - takes \~5 minutes

```
ue4 build
ue4 run
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://simdocs.deepdrive.io/docs/setup/linux/ue4docker-export.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
