Skip to content

Commit 1c65059

Browse files
committed
fix: install of yolox
1 parent 7cf1e4c commit 1c65059

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ line-length = 88
7979
[tool.isort]
8080
profile = "black"
8181
skip_gitignore = true
82-
known_third_party = "PIL,pytorch_msssim,torchvision,torch"
82+
known_third_party = "PIL,torchvision,torch"
8383

8484
[tool.uv.sources]
8585
compressai = { workspace = true }

scripts/install_uv.sh

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,15 @@ mkdir -p ${MODELS_WEIGHT_DIR}
7171
## Make sure we have up-to-date pip and wheel
7272
uv add --upgrade pip wheel
7373

74+
if [ "${CUDA_VERSION}" == "" ] && [ "${CPU}" == "False" ]; then
75+
CUDA_VERSION=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p')
76+
if [ ${CUDA_VERSION} == "" ]; then
77+
echo "error with cuda, check your system, source env_cuda.sh or specify cuda version as argument."
78+
fi
79+
fi
7480
if [ -z "$CUDA_VERSION" ] || [ "$CPU" == "True" ]; then
7581
echo "installing on cpu"
76-
uv pip install torch torchvision torchaudio --default-index https://download.pytorch.org/whl/cpu
82+
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
7783
wait
7884
else
7985
echo "cuda version: $CUDA_VERSION"
@@ -99,13 +105,6 @@ if [ "${MODEL,,}" == "detectron2" ] || [ ${MODEL} == "all" ]; then
99105
echo
100106
git -c advice.detachedHead=false checkout 175b2453c2bc4227b8039118c01494ee75b08136
101107

102-
if [ "${CUDA_VERSION}" == "" ] && [ "${CPU}" == "False" ]; then
103-
CUDA_VERSION=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\.[0-9]\+\).*$/\1/p')
104-
if [ ${CUDA_VERSION} == "" ]; then
105-
echo "error with cuda, check your system, source env_cuda.sh or specify cuda version as argument."
106-
fi
107-
fi
108-
109108
# '!' egating set -e when patching has been applied already
110109
! patch -p1 --forward <${SCRIPT_DIR}/0001-detectron2-fpn-bottom-up-separate.patch
111110

@@ -169,7 +168,7 @@ if [ "${MODEL,,}" == "jde" ] || [ ${MODEL} == "all" ]; then
169168

170169
# '!' negating set -e when patching has been applied already
171170
! patch -p1 --forward <../0001-compatible-with-numpy-1.24.1.patch
172-
uv pip install -e .
171+
uv pip install --no-build-isolation -e .
173172

174173
# clone
175174
if [ -z "$(ls -A ${MODELS_SOURCE_DIR}/Towards-Realtime-MOT)" ]; then
@@ -254,9 +253,7 @@ if [ "${MODEL,,}" == "yolox" ] || [ ${MODEL} == "all" ]; then
254253
# miminum requirments - no onnx, etc.
255254
cp ${SCRIPT_DIR}/yolox_requirements.txt requirements.txt
256255

257-
echo "haha1"
258-
uv pip install -e .
259-
echo "haha2"
256+
uv pip install --no-build-isolation -e .
260257
if [ "${DOWNLOAD_WEIGHTS}" == "True" ]; then
261258
if [ -z "$(ls -A ${MODELS_WEIGHT_DIR}/yolox)" ]; then
262259
echo
@@ -283,7 +280,7 @@ if [ "${MODEL,,}" == "mmpose" ] || [ ${MODEL} == "all" ]; then
283280
echo
284281

285282
uv pip install -U openmim
286-
uv run mim install "mmcv==2.0.1"
283+
uv run --no-sync mim install "mmcv==2.0.1"
287284

288285
# clone
289286
if [ -z "$(ls -A ${MODELS_SOURCE_DIR}/mmpose)" ]; then
@@ -297,8 +294,8 @@ if [ "${MODEL,,}" == "mmpose" ] || [ ${MODEL} == "all" ]; then
297294

298295
cd ${MODELS_SOURCE_DIR}/mmpose
299296
# miminum requirments - no onnx, etc.
300-
uv pip install -r requirements.txt
301-
uv pip install -v -e .
297+
uv pip install --no-build-isolation -r requirements/build.txt -r requirements/runtime.txt
298+
uv pip install --no-build-isolation -e .
302299

303300
uv run mim install mmdet==3.1.0
304301

0 commit comments

Comments
 (0)