Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
40fae75
Edit gitignore
katemartian Sep 23, 2025
7b25e94
Add workflow for deeplabcut
katemartian Sep 23, 2025
a2b34c6
Add yml draft for caiman releases
katemartian Sep 23, 2025
0cea2ba
Edit caiman yml
katemartian Sep 23, 2025
015a709
Try to use miniconda to install caiman
katemartian Sep 23, 2025
e9efcc3
Remove miniconda installation -- It was installed on the service
katemartian Sep 23, 2025
c00514c
Update caiman installation
katemartian Sep 23, 2025
957de35
Change hard-coded path to the caiman_data
katemartian Sep 23, 2025
25ed141
Add missing imports in caiman spec
katemartian Sep 23, 2025
4b7c4e8
Add caiman_data to the environment
katemartian Sep 23, 2025
88f919f
Edit spec files: add missing imports, specify build and dist paths
katemartian Sep 24, 2025
316793b
Draft release yml for MiniAn
katemartian Sep 24, 2025
8ba3a22
Add draft of suite2p release yml
katemartian Sep 24, 2025
71896d7
Remove torch installation from suite2p release
katemartian Sep 24, 2025
d6d3d0d
Edit minian release: try to use venv
katemartian Sep 24, 2025
8792f41
Revert to use conda for minian installation
katemartian Sep 24, 2025
fd3f931
Set python version to 3.9 for minian release
katemartian Sep 24, 2025
4ceec5c
Change python to 3.8 for minian installation
katemartian Sep 24, 2025
f2cfc60
Edit caiman release file
katemartian Sep 24, 2025
b8916e0
Fix caiman data dir
katemartian Sep 24, 2025
b9dde9a
Change place for caiman_data
katemartian Sep 24, 2025
bd2d973
Resolve caiman_data location
katemartian Sep 24, 2025
590e39c
Try to resolve caiman_data location again
katemartian Sep 24, 2025
0f4d854
Merge branch 'useGitHubActions' of https://github.com/doriclenses/pyD…
katemartian Sep 24, 2025
f624697
Change caiman data location in spec file
katemartian Sep 24, 2025
f2cfc49
Add caiman_data to collect
katemartian Sep 24, 2025
36506b4
Update location of the zip file for minian
katemartian Sep 24, 2025
e092582
Fix caiman zip in the workflow
katemartian Sep 25, 2025
6e6f86a
Define missing caiman data dir in spec file
katemartian Sep 25, 2025
b29b8c2
Merge branch 'main' into useGitHubActions
katemartian Oct 2, 2025
f9b7504
Add constraints for deeplabcut installation. Fix git ignore
katemartian Oct 2, 2025
9c92e1f
Fix error llvmpy for suite2p
katemartian Oct 7, 2025
341c360
Add collect all for h5py in minian
katemartian Oct 7, 2025
42840e1
Make sure to collect all dlls for h5py library in minian release
katemartian Oct 16, 2025
3d99e02
Print dlls that were taken when building minian
katemartian Oct 16, 2025
03ad35e
Include all dlls for h5py in minian release
katemartian Oct 16, 2025
853b4b2
Collect all data from pyarrow
katemartian Oct 16, 2025
ecc67c9
Collect data from skipped libraries
katemartian Oct 21, 2025
d89eb2c
Add torch, torchvision and pyarrow
katemartian Oct 22, 2025
ee3ad66
Remove unnecessary import in suite2p pack
katemartian Oct 22, 2025
b19f1a3
Add hook for torch
katemartian Oct 22, 2025
b3f0910
Add early fail if torch is installed incorrectly
katemartian Oct 22, 2025
1cabbe0
Use 2.8 torch version
katemartian Oct 22, 2025
8a660f9
Rearrange package collection for suite2p
katemartian Oct 22, 2025
e66091d
Edit package collection in minian
katemartian Oct 22, 2025
a9d9423
Edit package collection for caiman
katemartian Oct 22, 2025
2382a9f
Minor edits in spec files
katemartian Oct 22, 2025
426f362
Remove heavy libraries from the hook that are already collected by th…
katemartian Oct 22, 2025
70ac715
Space edits in spec files
katemartian Oct 22, 2025
8fe1456
Rename spec files
katemartian Oct 22, 2025
b0d5319
add sss for test
Oct 23, 2025
d350fc7
remove test commit
Oct 23, 2025
a846de2
Remove extra hooks for h5py for minian
katemartian Oct 23, 2025
95ef4d9
Try to collect more binaries for minian
katemartian Oct 28, 2025
ee0dc4b
Capture the environment during github release for minian
katemartian Oct 28, 2025
d0dce71
Try to reproduce the same environment as local for minian release
katemartian Oct 28, 2025
7b8ff4a
Try to use evironment yml from minian github
katemartian Oct 28, 2025
ab3d5c5
Add missing minian installation
katemartian Oct 28, 2025
1a00dcf
Collect all hdf5 dlls for minian release
katemartian Oct 28, 2025
67513de
Install SimpleITK with pip to avoid errors
katemartian Oct 29, 2025
61870d1
Update conda tooling and clean cache
katemartian Oct 29, 2025
3dc09a9
Pin versions of minian, h5py and pyinstaller
katemartian Oct 29, 2025
9d6b812
Place minian, h5py, and pyinstaller as the last libraries to install
katemartian Oct 29, 2025
32f7185
Fix parameters that are passed to pyinstaller Analysis in minian
katemartian Oct 29, 2025
32d41bc
Hide binary collection that wasn't here before. Change pyinstaller ve…
katemartian Oct 30, 2025
ed5ebdd
Missed file
katemartian Oct 30, 2025
d669d4a
Merge branch 'main' into useGitHubActions
katemartian Oct 30, 2025
caed858
Return back the collection of the hdf dlls
katemartian Oct 30, 2025
a341a40
Freeze release of h5py and pyinstaller to the ones before last minian…
katemartian Oct 30, 2025
deefa87
Uncomment dynamic lib collection
katemartian Oct 30, 2025
dec0d42
Set upx to false in minian
katemartian Oct 30, 2025
ba90745
Set release of h5py and pyinstaller to the ones used locally for minian
katemartian Oct 30, 2025
ea1d7ea
Pin versions of h5py and pyinstaller suggested by Codex for minian re…
katemartian Oct 30, 2025
23ee317
Set all versions to the local ones for minian release
katemartian Oct 31, 2025
dbce723
Fix typo in the yml file
katemartian Oct 31, 2025
ea251d6
Add missing dlls for minian release
katemartian Nov 6, 2025
20c20d5
Fix version of torch for cuda 12.8 in deeplabcut release
katemartian Nov 6, 2025
073ce45
Freeze version of suite2p
katemartian Nov 6, 2025
01f457e
Minor edits in the caiman and suite2p spec files
katemartian Nov 6, 2025
ad6f002
Test deeplabcut release including all the optional packages
katemartian Nov 6, 2025
d614de8
Mock matplotlib.patches.Ellipse
katemartian Nov 6, 2025
4b2f406
missing coma
Nov 7, 2025
5f69baf
remove commented code in spec deeplabcut
Nov 7, 2025
60b1edc
remove commented import
Nov 7, 2025
146ff88
Remove unnecessary comment
katemartian Nov 14, 2025
eb3a362
Update pins for suite2p
katemartian Nov 14, 2025
02e9d07
Remove redundnt spaces
katemartian Nov 14, 2025
f5bb2a5
Copy release zips to the shared directory on the workstation
katemartian Nov 14, 2025
593f590
Collect all the tbb dlls for suite2p release
katemartian Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 166 additions & 0 deletions .github/workflows/release-cmn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: Release CaImAn

on:
push:
tags: ['caiman-v*']
workflow_dispatch:

permissions:
contents: write

concurrency:
group: cmn-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: [self-hosted, Windows, X64, GPU]
timeout-minutes: 180

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract version from tag
shell: cmd
run: |
set VERSION=%GITHUB_REF_NAME:caiman-v=%
echo VERSION=%VERSION%>> %GITHUB_ENV%

- name: Verify Miniconda
shell: cmd
run: C:\Miniconda3\Scripts\conda.exe --version

- name: Create conda env for caiman
shell: cmd
run: |
C:\Miniconda3\Scripts\conda.exe env remove -n caiman_release -y || echo "no old env"
C:\Miniconda3\Scripts\conda.exe create -n caiman_release python=3.10 -y

- name: Install caiman deps with conda-forge
shell: cmd
run: |
C:\Miniconda3\Scripts\conda.exe install -n caiman_release -c conda-forge pyinstaller caiman -y
C:\Miniconda3\Scripts\conda.exe run -n caiman_release python -c "import caiman; print('Caiman version:', getattr(caiman,'__version__','?'))"

- name: caimanmanager install (detect path and export)
shell: cmd
run: |
C:\Miniconda3\Scripts\conda.exe run -n caiman_release caimanmanager install --force
for /f "delims=" %%H in ('C:\Miniconda3\Scripts\conda.exe run -n caiman_release python -c "import pathlib; print(pathlib.Path.home())"') do set "CM_HOME=%%H"
if exist "%CM_HOME%\caiman_data" (
echo CAIMAN_DATA_DIR=%CM_HOME%\caiman_data>> %GITHUB_ENV%
) else if exist "%CM_HOME%\.caimanmanager\caiman_data" (
echo CAIMAN_DATA_DIR=%CM_HOME%\.caimanmanager\caiman_data>> %GITHUB_ENV%
) else (
echo WARNING: caiman_data not found after install
)

- name: Preflight paths
shell: cmd
run: |
cd
dir
dir Deploy
dir Deploy\pack_caiman.spec

- name: Clean old dist/build
shell: cmd
working-directory: Deploy
run: |
if exist dist rmdir /s /q dist
if exist build rmdir /s /q build

- name: Build caiman exe
shell: cmd
working-directory: Deploy
run: |
C:\Miniconda3\Scripts\conda.exe run -n caiman_release pyinstaller --clean --noconfirm pack_caiman_run.spec
echo === DIST TREE ===
dir /s /b dist

- name: Zip onedir output with build-info
shell: cmd
working-directory: Deploy
env:
GIT_SHA: ${{ github.sha }}
run: |
rem Locate the onedir app folder under dist
set "APPDIR="
for /d %%D in (dist\*) do ( set "APPDIR=%%D" & goto :found )
:found
if not defined APPDIR ( echo ERROR: no onedir folder found in Deploy\dist & exit /b 1 )

rem Write build-info into the app folder (included in the zip)
echo Version: %VERSION%> "%APPDIR%\build-info.txt"
echo Commit: %GIT_SHA%>> "%APPDIR%\build-info.txt"
echo Date: %DATE% %TIME%>> "%APPDIR%\build-info.txt"

set "ZIPNAME=caiman-%VERSION%.zip"

rem Use conda env's python (single-line, no backslashes)
C:\Miniconda3\Scripts\conda.exe run -n caiman_release python -c "import os,zipfile; a=r'%APPDIR%'; zf=r'%ZIPNAME%'; assert os.path.isdir(a), 'no APPDIR: '+a; z=zipfile.ZipFile(zf,'w',zipfile.ZIP_DEFLATED); [z.write(os.path.join(r,f), os.path.relpath(os.path.join(r,f),a)) for r,_,fs in os.walk(a) for f in fs]; z.close()"
echo Created zip: %ZIPNAME%

- name: Show zip contents
shell: cmd
working-directory: Deploy
run: |
set "ZN=caiman-%VERSION%.zip"
if not exist "%ZN%" ( echo ERROR: zip not found & exit /b 1 )
C:\Miniconda3\Scripts\conda.exe run -n caiman_release python -c "import os,zipfile; zn=r'%ZN%'; z=zipfile.ZipFile(zn,'r'); n=z.namelist(); print('Entries in',zn,':',len(n)); [print(' ',x) for x in n[:50]]; z.close()"

- name: SHA256 of release zip
shell: cmd
working-directory: Deploy
run: |
setlocal EnableDelayedExpansion
set ZIP=caiman-%VERSION%.zip
if not exist "%ZIP%" ( echo ERROR: zip not found & exit /b 1 )
for /f "usebackq skip=1 tokens=1" %%H in (`certutil -hashfile "%ZIP%" SHA256 ^| findstr /v /i "hash certutil"`) do (
set HASH=%%H
goto :got
)
:got
echo !HASH!> caiman-%VERSION%.zip.sha256
type caiman-%VERSION%.zip.sha256

- name: Copy release zip
shell: cmd
working-directory: Deploy
env:
SHARE_DIR: "C:\\DoricSoftware\\danse\\Libraries\\CaImAn"
run: |
set "ZIP=caiman-%VERSION%.zip"
if not exist "%ZIP%" (
echo ERROR: zip not found
exit /b 1
)
set "DEST=%SHARE_DIR%"
if not exist "%DEST%" (
echo Creating %DEST%
mkdir "%DEST%"
)
copy /Y "%ZIP%" "%DEST%\"
echo Copied %ZIP% to %DEST%

- name: Create GitHub Release (attach zip + checksum)
uses: softprops/action-gh-release@v2
with:
name: caiman ${{ env.VERSION }}
body: |
Automated caiman release for tag ${{ github.ref_name }}.
- Version: ${{ env.VERSION }}
- Commit: ${{ github.sha }}
files: |
Deploy/caiman-${{ env.VERSION }}.zip
Deploy/caiman-${{ env.VERSION }}.zip.sha256

- name: Upload dist artifact (only on failure)
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: caiman-dist-${{ env.VERSION }}
path: Deploy/dist/**
retention-days: 3
compression-level: 1
148 changes: 148 additions & 0 deletions .github/workflows/release-dlc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: Release DeepLabCut

on:
push:
tags: ['deeplabcut-v*']
workflow_dispatch:

permissions:
contents: write

concurrency:
group: dlc-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: [self-hosted, Windows, X64, GPU]
timeout-minutes: 180

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract version from tag (cmd)
shell: cmd
run: |
set VERSION=%GITHUB_REF_NAME:deeplabcut-v=%
echo VERSION=%VERSION%>> %GITHUB_ENV%

- name: Create venv
shell: cmd
run: |
C:\Python310\python.exe -V
C:\Python310\python.exe -m venv venv

- name: Install deps
shell: cmd
run: |
venv\Scripts\python -m pip install --upgrade pip
venv\Scripts\pip install --constraint Deploy\constraints\pins-dlc.txt h5py pyinstaller deeplabcut==3.0.0rc8
venv\Scripts\pip install --constraint Deploy\constraints\pins-dlc.txt --upgrade --index-url https://download.pytorch.org/whl/cu128 torch==2.8.0+cu128 torchvision==0.23.0+cu128
venv\Scripts\python -c "import torch;print('Torch:',torch.__version__);print('CUDA build:',getattr(torch.version,'cuda',None));print('CUDA available:',torch.cuda.is_available())"

- name: Clean old dist/build
shell: cmd
working-directory: Deploy
run: |
if exist dist rmdir /s /q dist
if exist build rmdir /s /q build

- name: Build deeplabcut
shell: cmd
working-directory: Deploy
run: |
..\venv\Scripts\pyinstaller --clean --noconfirm pack_deeplabcut.spec
echo === DIST TREE ===
dir /s /b dist

- name: Smoke test torch/deeplabcut import
shell: cmd
run: |
venv\Scripts\python -c "import torch; import deeplabcut; print('torch', torch.__version__)"

- name: Zip onedir output with build-info
shell: cmd
working-directory: Deploy
env:
GIT_SHA: ${{ github.sha }}
run: |
rem Locate the onedir app folder under dist
set "APPDIR="
for /d %%D in (dist\*) do ( set "APPDIR=%%D" & goto :found )
:found
if not defined APPDIR ( echo ERROR: no onedir folder found in Deploy\dist & exit /b 1 )

rem Write build-info into the app folder (included in the zip)
echo Version: %VERSION%> "%APPDIR%\build-info.txt"
echo Commit: %GIT_SHA%>> "%APPDIR%\build-info.txt"
echo Date: %DATE% %TIME%>> "%APPDIR%\build-info.txt"

set "ZIPNAME=deeplabcut-%VERSION%.zip"

rem One-line Python (no backslashes/newlines)
..\venv\Scripts\python -c "import os,zipfile; a=r'%APPDIR%'; zf=r'%ZIPNAME%'; assert os.path.isdir(a), 'no APPDIR: '+a; z=zipfile.ZipFile(zf,'w',zipfile.ZIP_DEFLATED); [z.write(os.path.join(r,f), os.path.relpath(os.path.join(r,f),a)) for r,_,fs in os.walk(a) for f in fs]; z.close()"
echo Created zip: %ZIPNAME%

- name: Show zip contents
shell: cmd
working-directory: Deploy
run: |
set "ZN=deeplabcut-%VERSION%.zip"
if not exist "%ZN%" ( echo ERROR: zip not found & exit /b 1 )
..\venv\Scripts\python -c "import os,zipfile; zn=r'%ZN%'; z=zipfile.ZipFile(zn,'r'); n=z.namelist(); print('Entries in',zn,':',len(n)); [print(' ',x) for x in n[:50]]; z.close()"


- name: SHA256 of release zip
shell: cmd
working-directory: Deploy
run: |
setlocal EnableDelayedExpansion
set ZIP=deeplabcut-%VERSION%.zip
for /f "usebackq skip=1 tokens=1" %%H in (`certutil -hashfile "%ZIP%" SHA256 ^| findstr /v /i "hash certutil"`) do (
set HASH=%%H
goto :got
)
:got
echo !HASH!> deeplabcut-%VERSION%.zip.sha256
type deeplabcut-%VERSION%.zip.sha256

- name: Copy release zip to network share
shell: cmd
working-directory: Deploy
env:
SHARE_DIR: "C:\\DoricSoftware\\danse\\Libraries\\DeepLabCut"
run: |
set "ZIP=deeplabcut-%VERSION%.zip"
if not exist "%ZIP%" (
echo ERROR: zip not found
exit /b 1
)
set "DEST=%SHARE_DIR%"
if not exist "%DEST%" (
echo Creating %DEST%
mkdir "%DEST%"
)
copy /Y "%ZIP%" "%DEST%\"
echo Copied %ZIP% to %DEST%

- name: Create GitHub Release (attach zip + checksum)
uses: softprops/action-gh-release@v2
with:
name: deeplabcut ${{ env.VERSION }}
body: |
Automated deeplabcut release for tag ${{ github.ref_name }}.
- Version: ${{ env.VERSION }}
- Commit: ${{ github.sha }}
files: |
Deploy/deeplabcut-${{ env.VERSION }}.zip
Deploy/deeplabcut-${{ env.VERSION }}.zip.sha256

- name: Upload dist artifact (only on failure)
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: deeplabcut-dist-${{ env.VERSION }}
path: Deploy/dist/**
retention-days: 3
compression-level: 1
Loading