-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_github_workflow.sh
More file actions
33 lines (26 loc) · 1.07 KB
/
test_github_workflow.sh
File metadata and controls
33 lines (26 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -e
echo "--- 1. CLEANING ---"
rm -rf dist/ build/ *.egg-info
# Remove old env if it exists to start fresh
conda env remove -n pupil_ci_test -y || true
echo "--- 2. CREATING MINIMAL ENV ---"
# Only install Python and Pip via Conda to avoid solver conflicts
conda create -y -n pupil_ci_test python=3.10 pip -c conda-forge
# Activate
source $(conda info --base)/etc/profile.d/conda.sh
conda activate pupil_ci_test
echo "--- 3. INSTALLING BINARIES VIA PIP ---"
# We use 'opencv-python-headless' because it bundles its own
# GUI libraries, often avoiding the need for system libGL
pip install opencv-python-headless imageio[ffmpeg]
echo "--- 4. INSTALLING PYTORCH & DETECTRON2 ---"
pip install torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cpu
pip install --no-build-isolation 'git+https://github.com/facebookresearch/detectron2.git'
echo "--- 5. INSTALLING PROJECT ---"
pip install build
python -m build
pip install dist/*.tar.gz
echo "--- 6. VERIFICATION ---"
python -c "import detectron2; import cv2; print('✅ Setup Complete!')"
pytest