Welcome to FOOD, an acronym for "FPGA environment setup On OneAPI with Docker". This project is designed to simplify and streamline the creation of a containerized development environment for working with FPGAs using Intel's oneAPI toolkit. It addresses the common complexities of managing toolchain dependencies by using Docker to create a consistent, isolated, and reproducible workspace. Before you begin, you must have Docker installed on your host system and clone this repository.
This guide presents two distinct pathways for setup: a manual approach from the terminal or an automated build using a Dockerfile.
-
Option 1 (Manual Setup) involves pulling a standard Intel oneAPI base image and then executing a series of shell commands inside the running container. This hands-on process guides you through adding the Intel
aptrepository and installing the necessaryintel-oneapi-base-toolkitandintel-oneapi-compiler-fpgapackages, followed by cloning the oneAPI samples repository. This method is transparent and allows for customisation at each step. -
Option 2 (Automated Setup) uses the provided
Dockerfileto build a custom, pre-configured image with a single command. This is the recommended approach for quickly generating a ready-to-use development environment, as it automates all the installation and configuration steps detailed in the first option.
Regardless of the chosen method, the final outcome is a fully configured Docker container ready for development. Both options include a command to mount a local project directory into the container, ensuring that your work is preserved across sessions.
# 1. Install Docker (if not already installed)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# 2. Clone the repository
git clone https://github.com/thomas-dsl-johnson/FOOD.git# 1. Setting up container
cd FOOD
# Pull 2025.0 oneAPI image
sudo docker pull intel/oneapi-basekit:2025.0.2-0-devel-ubuntu24.04
# Start container (replace <container_name> with a suitable name)
sudo docker run --name <container_name> -it -v ./container_assets:/workspace intel/oneapi-basekit:2025.0.2-0-devel-ubuntu24.04 /bin/bash
# 2. Setup within container - ensure the basekit is installed, install the fpga add-on
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list
apt update
apt install intel-oneapi-base-toolkit-2025.0
apt install intel-oneapi-compiler-fpga-2025.0
# 3. Clone the samples repository
git clone -b master https://github.com/oneapi-src/oneAPI-samples.git
source /opt/intel/oneapi/setvars.sh
# We are done. Exit container.
exit
# In future you can start the container easily
sudo docker start -ai <container_name># 1. Build from the Dockerfile
cd FOOD
# 2. Build custom image from Dockerfile
sudo docker build -t intel-oneapi-fpga-dev:2025-custom .
# 3. Run container (replace <container_name> with a suitable name)
sudo docker run --name <container_name> -it -v ./container_assets:/workspace intel-oneapi-fpga-dev:2025-custom
# We are done. Exit container.
exit
# In future you can start the container easily
sudo docker start -ai <container_name>n.b. For information on an installation with Quartus go to the quartus/ folder of this repo.
Step 1:
Step 2: