Using Containers with Eclipse*
Install Eclipse
- Prerequisite: ensure Java* JRE 8 or 11 is installed.
- Download and install the latest Eclipse IDE for C/C++ Developers.
- Download and install the Intel® oneAPI Base Toolkit in order to easily browse samples.
Use the Samples Browser to Create an Eclipse Project
If you have installed the Intel® oneAPI Base Toolkit, you can use the Samples Browser integrated into the Eclipse IDE to create a project based on Intel® samples.
Run Eclipse and select

If you do not see an Intel menu in Eclipse,
install the oneAPI Eclipse plugins, then return to this page for instructions on how to Build and Run a sample.
The Sample Browser dialog window will be displayed.

Expand the sample tree and select a sample. Click
Finish
to create a project based on the sample.

Configure Project Properties
- Make sure you've followed the steps described on the Using Containers page to download the Docker image.
- Open the Project Properties by right clicking.
- InPropertiesselect , and open theContainer Settingstab to set the following:
- CheckBuild Inside Docker Image.
- Select the docker image to use. If there are no images listed, verify that Docker is enabled for non-root users. Alternatively, you can run Eclipse with sudo.
- Apply and close the settings.
Compile the Application
- Click the Build Icon
.
- Confirm that the console prints "Running in image..."
Run Application
- Create a Run Configuration with.
- Create a new C/C++ Container Launcher.
- Select the Container tab and make sure theImageis set to the correct Docker image. To enable GPU in the container, add/dev/driin theRequired Host Directoriesand checkRun in Privileged Mode.
- To enable GPU in the container, select theContainertab and add/dev/drias Required Host Directories, and checkRun in Privileged Mode.
- Click theRunicon.
- Confirm that the console printsRunning in image...