Skip to content

Build images#2028

Open
adam-urbanczyk wants to merge 59 commits intomasterfrom
adam-images
Open

Build images#2028
adam-urbanczyk wants to merge 59 commits intomasterfrom
adam-images

Conversation

@adam-urbanczyk
Copy link
Copy Markdown
Member

@adam-urbanczyk adam-urbanczyk commented Apr 14, 2026

  • apptainer
  • docker
  • update docs

This will enable to cadquery without any setup (other than installing apptainer/docker/...)

apptainer run oras://ghcr.io/cadquery/cadquery-apptainer:7def5bee87244e725a95046a79691869745ac190 ipython -i -c"import cadquery as cq"

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.61%. Comparing base (f86ff79) to head (9d07e62).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2028   +/-   ##
=======================================
  Coverage   95.61%   95.61%           
=======================================
  Files          30       30           
  Lines        8881     8881           
  Branches     1311     1311           
=======================================
  Hits         8492     8492           
  Misses        240      240           
  Partials      149      149           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lorenzncode
Copy link
Copy Markdown
Member

I think you are supposed to use apptainer run, then the env is already activated.

Got it. Confirmed the new image is working.
apptainer run /tmp/cq-ghcr-81f2a.sif python -c 'from cadquery.func import box; from cadquery.vis import show; show(box(1, 1, 4))'

I will try docker next.

Comment thread images/dockerfile Outdated
Comment thread images/dockerfile Outdated
Comment thread images/cq.def Outdated
@adam-urbanczyk adam-urbanczyk changed the title [WIP] Build images Build images May 2, 2026
Comment thread README.md
or docker/podman.

```
podman run -it -v /tmp:/tmp -e DISPLAY=$DISPLAY -t ghcr.io/cadquery/cadquery-docker:master ipython -i -c"from cadquery.func import *; from cadquery.vis import show; show(box(1,1,1))"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra redundant '-t'.

Comment thread README.md
or docker/podman.

```
podman run -it -v /tmp:/tmp -e DISPLAY=$DISPLAY -t ghcr.io/cadquery/cadquery-docker:master ipython -i -c"from cadquery.func import *; from cadquery.vis import show; show(box(1,1,1))"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the command works for me on linux (with changes):
a. use PR branch name as master is not yet published
b. I need to add: --userns=keep-id --user "$(id -u):$(id -g)"
and: --device /dev/dri
c. For SELinux I need to add: --security-opt label=disable
and more narrow bind also works: -v /tmp/.X11-unix:/tmp/.X11-unix

No changes needed, just for future reference.

Comment thread README.md
To quickly get started you can use apptainer

```
apptainer run oras://ghcr.io/cadquery/cadquery-apptainer:master ipython -i -c"from cadquery.func import *; form cadquery.vis import show; show(box(1,1,1))"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: form caquery.vis -> from cadquery.vis

I confirm the command works for me without any other changes except for the typo and using PR branch name rather than master.

Comment thread images/cq.def
environment.yml /opt
images/install_gl.sh /opt/install_gl.sh
images/install_env.sh /opt/install_env.sh
environment.yml /opt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a duplicate copy?

Comment thread images/cq.def
EnvironmentFile: environment.yml

%help
This container container a Python environment with CadQuery.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "container container"

Comment thread images/cq.def

To see what packages are in the environment:

apptainer run micromamba list
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apptainer run micromamba list
change to ->
apptainer run my_environment.sif micromamba list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants