Skip to content

Commit 0d770a6

Browse files
committed
install: allow cpu mode in FCM CTTC
1 parent 9a750be commit 0d770a6

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bash scripts/install.sh
6464

6565
To install the dependencies in conformance with MPEG FCM Test Conditions, run:
6666
```
67-
bash scripts/install.sh --fcm-cttc
67+
bash scripts/install.sh --fcm-cttc (--cpu)
6868
```
6969

7070

scripts/install.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ RUN OPTIONS:
5252
[--no-install) do not install (i.e. useful for only preparing source code by downloading and patching
5353
[--no-weights) prevents the installation script from downloading vision model parameters]
5454
[--fcm-cttc) Install all models in conformance with MPEG FCM Common Test and Training Conditions:
55-
Torch 2.0.0, Torchvision 0.15.1, CUDA 11.8]
55+
Torch 2.0.0, Torchvision 0.15.1, (CUDA 11.8 or CPU)]
5656
5757
5858
EXAMPLE [bash install.sh -m detectron2 -t "1.9.1" --cuda_version "11.8" --compressai /path/to/compressai]
59-
FCM EXAMPLE [bash install.sh --fcm-cttc]
59+
FCM EXAMPLE [bash install.sh --fcm-cttc (--cpu)]
6060
6161
_EOF_
6262
exit;
@@ -151,17 +151,18 @@ run_install_fcm_cttc() {
151151
TORCH_VERSION="2.0.0"
152152
# Correct torchvision version for torch 2.0.0
153153
TORCHVISION_VERSION="0.15.1"
154-
CTTC_CUDA_VERSION="11.8"
155154
MODEL="detectron2 jde yolox"
156-
CPU="False"
155+
156+
if [ ${CPU} == "False" ]; then
157+
CTTC_CUDA_VERSION="11.8"
157158

158-
# Verify CUDA version
159-
if [[ "${CUDA_VERSION}" != "${CTTC_CUDA_VERSION}" ]]; then
160-
echo "[ERROR] FCM CTTC Mode requires CUDA ${CTTC_CUDA_VERSION}, but detected ${CUDA_VERSION}."
161-
echo "Please ensure that your environment has CUDA ${CTTC_CUDA_VERSION} installed."
162-
exit 1
159+
# Verify CUDA version
160+
if [[ "${CUDA_VERSION}" != "${CTTC_CUDA_VERSION}" ]]; then
161+
echo "[ERROR] FCM CTTC Mode requires CUDA ${CTTC_CUDA_VERSION}, but detected ${CUDA_VERSION}."
162+
echo "Please ensure that your environment has CUDA ${CTTC_CUDA_VERSION} installed."
163+
exit 1
164+
fi
163165
fi
164-
exit 1
165166
}
166167

167168
run_prepare() {

0 commit comments

Comments
 (0)