Skip to content

Commit 8e76e57

Browse files
vfdev-5Jeff Yangsdesrozis
committed
[docker] Pillow -> Pillow-SIMD (#1509) (#1639)
* [docker] Pillow -> Pillow-SIMD (#1509) * [docker] Pillow -> Pillow-SIMD * replace pillow with pillow-simd in base docker files * chore(docker): apt-get autoremove after pillow-simd installation * apt-get install at once, autoremove g++ * install g++ in pillow installation layer Co-authored-by: Sylvain Desroziers <[email protected]> * Fix g++ install issue Co-authored-by: Jeff Yang <[email protected]> Co-authored-by: Sylvain Desroziers <[email protected]>
1 parent 0400ace commit 8e76e57

10 files changed

+55
-15
lines changed

docker/hvd/Dockerfile.hvd-apex

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,25 @@ RUN pip install --no-cache-dir /tmp/apex/apex-*.whl && \
4242
# Install tzdata / git
4343
RUN apt-get update && \
4444
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
45-
apt-get install -y tzdata && \
45+
apt-get -y install --no-install-recommends tzdata git && \
4646
dpkg-reconfigure --frontend noninteractive tzdata && \
47-
apt-get -y install --no-install-recommends git && \
47+
apt-get autoremove -y && \
48+
apt-get clean -y && \
4849
rm -rf /var/lib/apt/lists/*
4950

5051
# Ignite main dependencies
5152
RUN pip install --upgrade --no-cache-dir pytorch-ignite \
5253
tensorboard \
5354
tqdm
5455

56+
# replace pillow with pillow-simd
57+
RUN apt-get update && apt-get -y install --no-install-recommends g++ && \
58+
pip uninstall -y pillow && \
59+
CC="cc -mavx2" pip install --upgrade --no-cache-dir --force-reinstall pillow-simd && \
60+
apt-get remove -y g++ && \
61+
apt-get autoremove -y && \
62+
rm -rf /var/lib/apt/lists/*
63+
5564
# Checkout Ignite examples only
5665
RUN mkdir -p pytorch-ignite-examples && \
5766
cd pytorch-ignite-examples && \

docker/hvd/Dockerfile.hvd-apex-vision

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ RUN pip install --upgrade --no-cache-dir albumentations \
1616
numpy \
1717
opencv-python-headless \
1818
py_config_runner \
19-
pillow \
2019
clearml

docker/hvd/Dockerfile.hvd-base

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,25 @@ FROM pytorch/pytorch:${PTH_VERSION}-runtime
2121
# Install tzdata / git
2222
RUN apt-get update && \
2323
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
24-
apt-get install -y tzdata && \
24+
apt-get -y install --no-install-recommends tzdata git && \
2525
dpkg-reconfigure --frontend noninteractive tzdata && \
26-
apt-get -y install --no-install-recommends git && \
26+
apt-get autoremove -y && \
27+
apt-get clean -y && \
2728
rm -rf /var/lib/apt/lists/*
2829

2930
# Ignite main dependencies
3031
RUN pip install --upgrade --no-cache-dir pytorch-ignite \
3132
tensorboard \
3233
tqdm
3334

35+
# replace pillow with pillow-simd
36+
RUN apt-get update && apt-get -y install --no-install-recommends g++ && \
37+
pip uninstall -y pillow && \
38+
CC="cc -mavx2" pip install --upgrade --no-cache-dir --force-reinstall pillow-simd && \
39+
apt-get remove -y g++ && \
40+
apt-get autoremove -y && \
41+
rm -rf /var/lib/apt/lists/*
42+
3443
# Checkout Ignite examples only
3544
RUN mkdir -p pytorch-ignite-examples && \
3645
cd pytorch-ignite-examples && \

docker/hvd/Dockerfile.hvd-vision

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ RUN pip install --upgrade --no-cache-dir albumentations \
1616
numpy \
1717
opencv-python-headless \
1818
py_config_runner \
19-
pillow \
2019
clearml

docker/main/Dockerfile.apex

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,25 @@ RUN pip install --no-cache-dir /tmp/apex/apex-*.whl && \
3131
# Install tzdata / git
3232
RUN apt-get update && \
3333
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
34-
apt-get install -y tzdata && \
34+
apt-get -y install --no-install-recommends tzdata git && \
3535
dpkg-reconfigure --frontend noninteractive tzdata && \
36-
apt-get -y install --no-install-recommends git && \
36+
apt-get autoremove -y && \
37+
apt-get clean -y && \
3738
rm -rf /var/lib/apt/lists/*
3839
3940
# Ignite main dependencies
4041
RUN pip install --upgrade --no-cache-dir pytorch-ignite \
4142
tensorboard \
4243
tqdm
4344
45+
# replace pillow with pillow-simd
46+
RUN apt-get update && apt-get -y install --no-install-recommends g++ && \
47+
pip uninstall -y pillow && \
48+
CC="cc -mavx2" pip install --upgrade --no-cache-dir --force-reinstall pillow-simd && \
49+
apt-get remove -y g++ && \
50+
apt-get autoremove -y && \
51+
rm -rf /var/lib/apt/lists/*
52+
4453
# Checkout Ignite examples only
4554
RUN mkdir -p pytorch-ignite-examples && \
4655
cd pytorch-ignite-examples && \

docker/main/Dockerfile.apex-vision

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ RUN pip install --upgrade --no-cache-dir albumentations \
1616
numpy \
1717
opencv-python-headless \
1818
py_config_runner \
19-
pillow \
2019
clearml

docker/main/Dockerfile.base

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ FROM pytorch/pytorch:${PTH_VERSION}-runtime
66
# Install tzdata / git
77
RUN apt-get update && \
88
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
9-
apt-get install -y tzdata && \
9+
apt-get -y install --no-install-recommends tzdata git && \
1010
dpkg-reconfigure --frontend noninteractive tzdata && \
11-
apt-get -y install --no-install-recommends git && \
11+
apt-get autoremove -y && \
12+
apt-get clean -y && \
1213
rm -rf /var/lib/apt/lists/*
1314

1415
# Ignite main dependencies
1516
RUN pip install --upgrade --no-cache-dir pytorch-ignite \
1617
tensorboard \
1718
tqdm
1819

20+
# replace pillow with pillow-simd
21+
RUN apt-get update && apt-get -y install --no-install-recommends g++ && \
22+
pip uninstall -y pillow && \
23+
CC="cc -mavx2" pip install --upgrade --no-cache-dir --force-reinstall pillow-simd && \
24+
apt-get remove -y g++ && \
25+
apt-get autoremove -y && \
26+
rm -rf /var/lib/apt/lists/*
27+
1928
# Checkout Ignite examples only
2029
RUN mkdir -p pytorch-ignite-examples && \
2130
cd pytorch-ignite-examples && \

docker/main/Dockerfile.vision

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ RUN pip install --upgrade --no-cache-dir albumentations \
1515
numpy \
1616
opencv-python-headless \
1717
py_config_runner \
18-
pillow \
1918
clearml

docker/msdp/Dockerfile.msdp-apex

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,25 @@ RUN cd /msdp && export CUDA_HOME=/usr/local/cuda && \
5353
# Install tzdata / git
5454
RUN apt-get update && \
5555
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
56-
apt-get install -y tzdata && \
56+
apt-get -y install --no-install-recommends tzdata git && \
5757
dpkg-reconfigure --frontend noninteractive tzdata && \
58-
apt-get -y install --no-install-recommends git && \
58+
apt-get autoremove -y && \
59+
apt-get clean -y && \
5960
rm -rf /var/lib/apt/lists/*
6061

6162
# Ignite main dependencies
6263
RUN pip install --upgrade --no-cache-dir pytorch-ignite \
6364
tensorboard \
6465
tqdm
6566

67+
# replace pillow with pillow-simd
68+
RUN apt-get update && apt-get -y install --no-install-recommends g++ && \
69+
pip uninstall -y pillow && \
70+
CC="cc -mavx2" pip install --upgrade --no-cache-dir --force-reinstall pillow-simd && \
71+
apt-get remove -y g++ && \
72+
apt-get autoremove -y && \
73+
rm -rf /var/lib/apt/lists/*
74+
6675
# Checkout Ignite examples only
6776
RUN mkdir -p pytorch-ignite-examples && \
6877
cd pytorch-ignite-examples && \

docker/msdp/Dockerfile.msdp-apex-vision

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ RUN pip install --upgrade --no-cache-dir albumentations \
1515
numpy \
1616
opencv-python-headless \
1717
py_config_runner \
18-
pillow \
1918
clearml

0 commit comments

Comments
 (0)