Skip to content

Commit

Permalink
Update Dockerfile-cpu to force python3.9 (ultralytics#7675)
Browse files Browse the repository at this point in the history
* Update

* Update

* Do not install torch

* Pillow>9.1

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile

* fix emoji

* reduce scipy

* add libpython3.9

* Update Dockerfile
  • Loading branch information
glenn-jocher authored and Clay Januhowski committed Sep 8, 2022
1 parent 0170fa1 commit 3f460bc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ opencv-python>=4.1.1
Pillow>=7.1.2
PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.5
scipy>=1.4.1 # Google Colab version
torch>=1.7.0
torchvision>=0.8.1
tqdm>=4.41.0
Expand Down
3 changes: 1 addition & 2 deletions utils/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ FROM nvcr.io/nvidia/pytorch:21.10-py3
# Install linux packages
RUN apt update && apt install -y zip htop screen libgl1-mesa-glx

# Install python dependencies
# Install pip packages
COPY requirements.txt .
RUN python -m pip install --upgrade pip
RUN pip uninstall -y torch torchvision torchtext
RUN pip install --no-cache -r requirements.txt albumentations wandb gsutil notebook \
torch==1.11.0+cu113 torchvision==0.12.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
# RUN pip install --no-cache -U torch torchvision

# Create working directory
RUN mkdir -p /usr/src/app
Expand Down
16 changes: 10 additions & 6 deletions utils/docker/Dockerfile-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ FROM ubuntu:latest
# Install linux packages
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y tzdata
RUN apt install -y python3-pip git zip curl htop screen libgl1-mesa-glx libglib2.0-0
RUN alias python=python3
RUN apt install -y python3-pip git zip curl htop screen libgl1-mesa-glx libglib2.0-0 software-properties-common

# Install python dependencies
# Install python3.9
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt install python3.9 python3.9-distutils libpython3.9 -y
# RUN alias python=python3.9

# Install pip packages
COPY requirements.txt .
RUN python3 -m pip install --upgrade pip
RUN pip install --no-cache -r requirements.txt albumentations gsutil notebook \
RUN python3.9 -m pip install --upgrade pip
RUN python3.9 -m pip install --no-cache -r requirements.txt albumentations gsutil notebook \
coremltools onnx onnx-simplifier onnxruntime openvino-dev tensorflow-cpu tensorflowjs \
torch==1.11.0+cpu torchvision==0.12.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu

# Create working directory
RUN mkdir -p /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def check_dataset(data, autodownload=True):
if val:
val = [Path(x).resolve() for x in (val if isinstance(val, list) else [val])] # val path
if not all(x.exists() for x in val):
LOGGER.info(emojis('\nDataset not found ⚠, missing paths %s' % [str(x) for x in val if not x.exists()]))
LOGGER.info(emojis('\nDataset not found ⚠, missing paths %s' % [str(x) for x in val if not x.exists()]))
if s and autodownload: # download script
t = time.time()
root = path.parent if 'path' in data else '..' # unzip directory i.e. '../'
Expand Down

0 comments on commit 3f460bc

Please sign in to comment.