Skip to content

Commit 5cd3706

Browse files
authored
Merge pull request #225 from KumarLabJax/bug/fix-jabs-cli-in-singularity-image
Bug/fix jabs cli in singularity image
2 parents 54cf632 + 7aecf91 commit 5cd3706

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ https://doi.org/10.5281/zenodo.16697331
130130

131131
## Singularity/Linux
132132

133-
We supply a tested pair of singularity definition files. The [first vm](vm/behavior-classifier-vm.def) is intended for command-line use on
134-
compute clusters when scaling inferences. The [second vm](vm/behavior-classifier-vm-gui.def) is designed for interacting with the GUI in a portable
133+
We supply a tested pair of singularity definition files. The [first vm](vm/headless.def) is intended for command-line use on
134+
compute clusters when scaling inferences. The [second vm](vm/gui.def) is designed for interacting with the GUI in a portable
135135
environment. Please inspect the definition files for related linux packages to run the software.
136136

137137
## JABS Project Portability

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "jabs-behavior-classifier"
3-
version = "0.36.0"
3+
version = "0.36.1"
44
description = ""
55
readme = "README.md"
66
requires-python = ">=3.10,<3.14"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# build like:
2-
# singularity build --fakeroot JABS-GUI.sif behavior-classifier-vm-gui.def
2+
# singularity build --fakeroot JABS-GUI.sif gui.def
33

44
Bootstrap: docker
55
From: ghcr.io/astral-sh/uv:python3.13-bookworm
66

7-
%environment
8-
export UV_SYSTEM_PYTHON=1
97

108
%setup
119
mkdir -p ${SINGULARITY_ROOTFS}/behavior-classifier
@@ -21,14 +19,29 @@ From: ghcr.io/astral-sh/uv:python3.13-bookworm
2119

2220
%post
2321
# GUI libraries
24-
apt-get update && apt-get install -y qt6-base-dev libglu1-mesa-dev libgl1-mesa-glx alsa-utils libnss3 libxkbfile1 'libxcb*'
22+
apt-get update && apt-get install -y \
23+
qt6-base-dev \
24+
libglu1-mesa-dev \
25+
libgl1-mesa-glx \
26+
alsa-utils \
27+
libnss3 \
28+
libxkbfile1 \
29+
'libxcb*' &&
30+
apt-get clean && \
31+
rm -rf /var/lib/apt/lists/*
2532
# Note that libxcb is wildcarded because it wasn't very clear which xcb library was missing, so we can just grab them all
2633

27-
# Run unittests to ensure build environment should work as intended
34+
export UV_SYSTEM_PYTHON=1
35+
export UV_PYTHON=/usr/local/bin/python
36+
2837
cd /behavior-classifier/
2938
uv sync --locked --compile-bytecode --no-editable
39+
40+
# Run unittests to ensure build environment should work as intended
3041
uv run pytest tests
3142

43+
uv build && python3 -m pip install dist/*.whl
44+
3245
# Cleanup
3346
rm -R /behavior-classifier
3447

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# build like:
2-
# singularity build --fakeroot behavior-classifier.sif behavior-classifier-vm.def
2+
# singularity build --fakeroot behavior-classifier.sif headless.def
33

44
Bootstrap: docker
55
From: ghcr.io/astral-sh/uv:python3.13-bookworm
66

7-
%environment
8-
export UV_SYSTEM_PYTHON=1
97

108
%setup
119
mkdir -p ${SINGULARITY_ROOTFS}/behavior-classifier
@@ -20,11 +18,14 @@ From: ghcr.io/astral-sh/uv:python3.13-bookworm
2018
exec jabs-classify "$@"
2119

2220
%post
23-
# Run unittests to ensure build environment should work as intended
24-
# skip tests of GUI components that will fail since this Singularity image does not support the JABS gui
2521
cd /behavior-classifier/
2622
uv sync --locked --compile-bytecode --no-editable
23+
24+
# Run unittests to ensure build environment should work as intended
25+
# skip tests of GUI components that will fail since this Singularity image does not support the JABS gui
2726
uv run pytest --ignore=tests/test_search_bar_widget.py tests
2827

28+
uv build && python3 -m pip install dist/*.whl
29+
2930
# Cleanup
3031
rm -R /behavior-classifier

0 commit comments

Comments
 (0)