Dockerfile uninstall torch nightly in favor of stable (#10604)

@AyushExel @Laughing-q fix for Docker error 

```
AttributeError: Can't get attribute '_rebuild_parameter_v2' on <module 'torch._utils' from '/Users/glennjocher/PycharmProjects/ultralytics/venv/lib/python3.10/site-packages/torch/_utils.py'> 
```

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2022-12-27 14:32:21 +01:00 committed by GitHub
parent 3c1afd9ab6
commit e72dc1faba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,10 +12,10 @@ ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Aria
# Install linux packages # Install linux packages
RUN apt update && apt install --no-install-recommends -y zip htop screen libgl1-mesa-glx RUN apt update && apt install --no-install-recommends -y zip htop screen libgl1-mesa-glx
# Install pip packages # Install pip packages (uninstall torch nightly in favor of stable)
COPY requirements.txt . COPY requirements.txt .
RUN python -m pip install --upgrade pip wheel RUN python -m pip install --upgrade pip wheel
RUN pip uninstall -y Pillow torchtext # torch torchvision RUN pip uninstall -y Pillow torchtext torch torchvision
RUN pip install --no-cache -r requirements.txt ultralytics albumentations comet gsutil notebook Pillow>=9.1.0 \ RUN pip install --no-cache -r requirements.txt ultralytics albumentations comet gsutil notebook Pillow>=9.1.0 \
'opencv-python<4.6.0.66' \ 'opencv-python<4.6.0.66' \
--extra-index-url https://download.pytorch.org/whl/cu113 --extra-index-url https://download.pytorch.org/whl/cu113