Skip to content

Instantly share code, notes, and snippets.

@metalinspired
Created May 20, 2026 09:30
Show Gist options
  • Select an option

  • Save metalinspired/881c43b1730d00f83a877c24a5f378e5 to your computer and use it in GitHub Desktop.

Select an option

Save metalinspired/881c43b1730d00f83a877c24a5f378e5 to your computer and use it in GitHub Desktop.
Run FlatCam from within Docker

Run FlatCam from within Docker

Prepare

git clone https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_8.995 flatcam_beta
cd flatcam_beta
vim Dockerfile # Paste in the content of Dockerfile

Build

docker build -t flatcam-beta .

Run

docker run -it --rm \
 --device /dev/dri \
 --group-add video \
 --security-opt seccomp=unconfined \
 -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
 -v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY \
 -v $HOME/flatcam/.conf:/root/.FlatCAM \
 -v $HOME/flatcam:/workspace \
 -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
 -e GDK_BACKEND=wayland \
 flatcam-beta

Notes

Tested on Ubuntu 26.04 running on AMD Ryzen AI 7 PRO 350 w/ Radeon 860M.

FROM python:3.12-slim
ARG USERNAME=flatcam
ARG USER_UID=1000
ARG USER_GID=$USER_UID
WORKDIR /app
COPY . .
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
libgl1 \
libegl1 \
freeglut3-dev \
libqt6gui6 \
libqt6widgets6 \
libqt6core6t64 \
libgdal-dev \
libcairo2-dev \
python3-tk \
qt6-wayland \
&& pip install --upgrade --no-cache-dir pip setuptools wheel \
&& pip install --no-cache-dir GDAL=="$(gdal-config --version)" \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get remove -y \
build-essential \
gcc \
g++ \
libgdal-dev \
libcairo2-dev \
&& apt-get autoremove -y --purge \
&& apt-get clean \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/*
CMD ["python", "flatcam.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment