Browse Source

Update Dockerfile-cpu to force python3.9 (#7675)

* 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
modifyDataloader
Glenn Jocher GitHub 2 years ago
parent
commit
c4862fcd31
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions
  1. +1
    -1
      requirements.txt
  2. +1
    -2
      utils/docker/Dockerfile
  3. +10
    -6
      utils/docker/Dockerfile-cpu
  4. +1
    -1
      utils/general.py

+ 1
- 1
requirements.txt View File

Pillow>=7.1.2 Pillow>=7.1.2
PyYAML>=5.3.1 PyYAML>=5.3.1
requests>=2.23.0 requests>=2.23.0
scipy>=1.5
scipy>=1.4.1 # Google Colab version
torch>=1.7.0 torch>=1.7.0
torchvision>=0.8.1 torchvision>=0.8.1
tqdm>=4.41.0 tqdm>=4.41.0

+ 1
- 2
utils/docker/Dockerfile View File

# Install linux packages # Install linux packages
RUN apt update && apt install -y zip htop screen libgl1-mesa-glx RUN apt update && apt install -y zip htop screen libgl1-mesa-glx


# Install python dependencies
# Install pip packages
COPY requirements.txt . COPY requirements.txt .
RUN python -m pip install --upgrade pip RUN python -m pip install --upgrade pip
RUN pip uninstall -y torch torchvision torchtext RUN pip uninstall -y torch torchvision torchtext
RUN pip install --no-cache -r requirements.txt albumentations wandb gsutil notebook \ 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 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 # Create working directory
RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app

+ 10
- 6
utils/docker/Dockerfile-cpu View File

# Install linux packages # Install linux packages
RUN apt update RUN apt update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y tzdata 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 . 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 \ 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 # Create working directory
RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app

+ 1
- 1
utils/general.py View File

if val: if val:
val = [Path(x).resolve() for x in (val if isinstance(val, list) else [val])] # val path 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): 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 if s and autodownload: # download script
t = time.time() t = time.time()
root = path.parent if 'path' in data else '..' # unzip directory i.e. '../' root = path.parent if 'path' in data else '..' # unzip directory i.e. '../'

Loading…
Cancel
Save