Skip to content

Commit c0eb944

Browse files
hkotesovahkotesova
authored andcommitted
add new line between pip install and package list
1 parent 80e55f7 commit c0eb944

File tree

8 files changed

+140
-70
lines changed

8 files changed

+140
-70
lines changed

assets/training/automl/environments/ai-ml-automl-dnn-forecasting-gpu/context/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ RUN pip install \
9898
# end pip install
9999

100100
# Fix vulnerabilities - upgrade pip, starlette, urllib3
101-
RUN pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0'
102-
RUN pip install --no-cache-dir torchvision==0.23.0
103-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'h2>=4.3.0'
101+
RUN pip install \
102+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0'
103+
RUN pip install \
104+
--no-cache-dir torchvision==0.23.0
105+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
106+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'h2>=4.3.0'
104107

105108
RUN /bin/bash -c "source activate $AZUREML_CONDA_ENVIRONMENT_PATH && \
106109
pip install --no-cache-dir torch==2.8.0"

assets/training/automl/environments/ai-ml-automl-dnn-gpu/context/Dockerfile

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ RUN conda run -p $AZUREML_CONDA_ENVIRONMENT_PATH
5050
###############################
5151
# Pre-Build LightGBM
5252
###############################
53-
RUN pip install --upgrade lightgbm==4.6.0
53+
RUN pip install \
54+
--upgrade lightgbm==4.6.0
5455

5556
###############################
5657
# Install GPU LightGBM and XgBoost
5758
###############################
58-
RUN pip install --upgrade --force-reinstall xgboost==1.5.2 pandas==1.5.3
59+
RUN pip install \
60+
--upgrade --force-reinstall xgboost==1.5.2 pandas==1.5.3
5961

6062
# begin conda create
6163
# Install conda packages
@@ -113,24 +115,36 @@ RUN pip install \
113115
# end pypi dependencies
114116

115117
# Fix vulnerabilities
116-
RUN pip install --force-reinstall torchvision==0.23.0 --no-cache-dir
117-
RUN pip install --upgrade 'requests==2.32.5'
118-
RUN pip install --upgrade 'urllib3==2.5.0'
119-
RUN pip install --upgrade 'pillow==12.0.0'
118+
RUN pip install \
119+
--force-reinstall torchvision==0.23.0 --no-cache-dir
120+
RUN pip install \
121+
--upgrade 'requests==2.32.5'
122+
RUN pip install \
123+
--upgrade 'urllib3==2.5.0'
124+
RUN pip install \
125+
--upgrade 'pillow==12.0.0'
120126

121127
# If you have other python/pip environments, update them too:
122-
RUN /opt/miniconda/bin/pip install --upgrade 'urllib3==2.5.0' || true
123-
RUN /opt/conda/bin/pip install --upgrade 'urllib3==2.5.0' || true
124-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'urllib3==2.5.0' || true
128+
RUN /opt/miniconda/bin/pip install \
129+
--upgrade 'urllib3==2.5.0' || true
130+
RUN /opt/conda/bin/pip install \
131+
--upgrade 'urllib3==2.5.0' || true
132+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
133+
--upgrade 'urllib3==2.5.0' || true
125134
# --- End Vulnerability Fixes ---
126135
# --- Pin NumPy <2 everywhere to avoid NumPy 2.x incompatibility ---
127-
RUN conda run -p $AZUREML_CONDA_ENVIRONMENT_PATH pip install 'numpy==1.26.4' --force-reinstall && \
128-
pip install 'numpy==1.26.4' --force-reinstall && \
129-
/opt/conda/bin/pip install 'numpy==1.26.4' --force-reinstall || true
130-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'h2>=4.3.0'
136+
RUN conda run -p $AZUREML_CONDA_ENVIRONMENT_PATH pip install \
137+
'numpy==1.26.4' --force-reinstall && \
138+
pip install \
139+
'numpy==1.26.4' --force-reinstall && \
140+
/opt/conda/bin/pip install \
141+
'numpy==1.26.4' --force-reinstall || true
142+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
143+
--upgrade 'h2>=4.3.0'
131144

132145
RUN /bin/bash -c "source activate $AZUREML_CONDA_ENVIRONMENT_PATH && \
133-
pip install --no-cache-dir torch==2.8.0"
146+
pip install \
147+
--no-cache-dir torch==2.8.0"
134148

135149
RUN /bin/bash -c "source activate $AZUREML_CONDA_ENVIRONMENT_PATH && \
136150
export CUDACXX=/usr/local/cuda/bin/nvcc && \

assets/training/automl/environments/ai-ml-automl-dnn-text-gpu-ptca/context/Dockerfile

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,60 @@ RUN apt-get update && \
2020
apt-mark hold sudo && \
2121
apt-get clean && rm -rf /var/lib/apt/lists/*
2222

23-
RUN pip install 'azureml-automl-dnn-nlp=={{latest-pypi-version}}'
24-
RUN pip install 'azureml-defaults=={{latest-pypi-version}}'
23+
RUN pip install \
24+
'azureml-automl-dnn-nlp=={{latest-pypi-version}}'
25+
RUN pip install \
26+
'azureml-defaults=={{latest-pypi-version}}'
2527

2628
RUN pip uninstall -y onnxruntime
27-
RUN pip install torch==2.8.0 torchvision==0.23.0
29+
RUN pip install \
30+
torch==2.8.0 torchvision==0.23.0
2831
# Install/upgrade torch in ptca env if it exists (fixes vulnerability)
29-
RUN /opt/conda/envs/ptca/bin/pip install --force-reinstall torch==2.8.0 torchvision==0.23.0 || true
32+
RUN /opt/conda/envs/ptca/bin/pip install \
33+
--force-reinstall torch==2.8.0 torchvision==0.23.0 || true
3034

31-
RUN pip install onnx==1.17.0
35+
RUN pip install \
36+
onnx==1.17.0
3237
RUN pip uninstall -y onnxruntime-training
33-
RUN pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ onnxruntime-training==1.18.0
34-
RUN pip install "numpy==1.23.5" --force-reinstall
35-
RUN /opt/conda/envs/ptca/bin/pip install "numpy==1.23.5" --force-reinstall || true
38+
RUN pip install \
39+
-i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ onnxruntime-training==1.18.0
40+
RUN pip install \
41+
"numpy==1.23.5" --force-reinstall
42+
RUN /opt/conda/envs/ptca/bin/pip install \
43+
"numpy==1.23.5" --force-reinstall || true
3644
RUN TORCH_CUDA_ARCH_LIST="5.2;6.0;7.0;8.0;8.6;9.0" python -m onnxruntime.training.ortmodule.torch_cpp_extensions.install
37-
RUN pip install torch-ort==1.18.0 && TORCH_CUDA_ARCH_LIST="5.2;6.0;7.0;8.0;8.6;9.0" python -m torch_ort.configure
45+
RUN pip install t\
46+
orch-ort==1.18.0 && TORCH_CUDA_ARCH_LIST="5.2;6.0;7.0;8.0;8.6;9.0" python -m torch_ort.configure
3847

3948
RUN pip uninstall -y onnxruntime
4049

41-
RUN pip install transformers==4.53.0
42-
RUN pip install optimum==1.23.3
43-
RUN pip install accelerate==0.33.0
44-
RUN pip install deepspeed~=0.15.1
50+
RUN pip install \
51+
transformers==4.53.0
52+
RUN pip install \
53+
optimum==1.23.3
54+
RUN pip install \
55+
accelerate==0.33.0
56+
RUN pip install \
57+
deepspeed~=0.15.1
4558

4659
# Address vulnerabilities
47-
RUN pip install pyarrow==14.0.1
48-
RUN pip install aiohttp==3.12.14
49-
RUN pip install idna==3.7
50-
RUN pip install requests==2.32.5
51-
RUN pip install urllib3==2.5.0
52-
RUN /opt/conda/bin/pip install --upgrade 'urllib3==2.5.0' || true
60+
RUN pip install \
61+
pyarrow==14.0.1
62+
RUN pip install \
63+
aiohttp==3.12.14
64+
RUN pip install \
65+
idna==3.7
66+
RUN pip install \
67+
requests==2.32.5
68+
RUN pip install \
69+
urllib3==2.5.0
70+
RUN /opt/conda/bin/pip install \
71+
--upgrade 'urllib3==2.5.0' || true
5372

5473
# Patch for Pillow vulnerability
55-
RUN pip install --upgrade 'pillow==12.0.0'
56-
RUN /opt/conda/envs/ptca/bin/pip install --upgrade 'pillow==12.0.0' || true
74+
RUN pip install \
75+
--upgrade 'pillow==12.0.0'
76+
RUN /opt/conda/envs/ptca/bin/pip install \
77+
--upgrade 'pillow==12.0.0' || true
5778

5879
RUN pip list

assets/training/automl/environments/ai-ml-automl-dnn-text-gpu/context/Dockerfile

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,36 @@ RUN pip install \
9696
# We should aim for this list to be empty with new and patched releases
9797
# by fixing dependencies in the base packages
9898
RUN pip list && \
99-
pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' && \
100-
pip install pyarrow==14.0.2 \
99+
pip install \
100+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' && \
101+
pip install \
102+
pyarrow==14.0.2 \
101103
'transformers[sentencepiece,torch]==4.53.0' \
102104
aiohttp==3.12.14
103-
RUN pip install torchvision==0.23.0
104-
RUN /opt/conda/envs/ptca/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' torch==2.8.0 torchvision==0.23.0 || true
105-
RUN /azureml-envs/azureml-automl-dnn-text-gpu/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0' || true
106-
RUN /opt/conda/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0' || true
107-
RUN /opt/conda/envs/ptca/bin/pip install --upgrade 'urllib3==2.5.0' || true
105+
RUN pip install \
106+
torchvision==0.23.0
107+
RUN /opt/conda/envs/ptca/bin/pip install \
108+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' torch==2.8.0 torchvision==0.23.0 || true
109+
RUN /azureml-envs/azureml-automl-dnn-text-gpu/bin/pip install \
110+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0' || true
111+
RUN /opt/conda/bin/pip install --upgrade \
112+
'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0' || true
113+
RUN /opt/conda/envs/ptca/bin/pip install \
114+
--upgrade 'urllib3==2.5.0' || true
108115

109116
# Patch for pillow vulnerability
110-
RUN /azureml-envs/azureml-automl-dnn-text-gpu/bin/pip install --upgrade 'pillow==12.0.0' || true
111-
RUN /opt/conda/bin/pip install --upgrade 'pillow==12.0.0' || true
112-
RUN /opt/conda/envs/ptca/bin/pip install --upgrade 'pillow==12.0.0' || true
113-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'h2>=4.3.0'
117+
RUN /azureml-envs/azureml-automl-dnn-text-gpu/bin/pip install \
118+
--upgrade 'pillow==12.0.0' || true
119+
RUN /opt/conda/bin/pip install \
120+
--upgrade 'pillow==12.0.0' || true
121+
RUN /opt/conda/envs/ptca/bin/pip install \
122+
--upgrade 'pillow==12.0.0' || true
123+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
124+
--upgrade 'h2>=4.3.0'
114125

115126
RUN /bin/bash -c "source activate $AZUREML_CONDA_ENVIRONMENT_PATH && \
116-
pip install --no-cache-dir torch==2.8.0"
127+
pip install \
128+
--no-cache-dir torch==2.8.0"
117129

118130
RUN /bin/bash -c "source activate $AZUREML_CONDA_ENVIRONMENT_PATH && \
119131
export CUDACXX=/usr/local/cuda/bin/nvcc && \

assets/training/automl/environments/ai-ml-automl-dnn-vision-gpu/context/Dockerfile

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,36 @@ RUN pip install \
9393
# end pypi dependencies
9494

9595
# Update cryptography and pyarow for fixing vulnerability. Doing it separately from pip install to avoid conflict with other packages
96-
RUN pip install cryptography>=45.0.7 \
96+
RUN pip install \
97+
cryptography>=45.0.7 \
9798
pyarrow==14.0.2 \
9899
aiohttp>=3.12.14
99100

100101
# Patch for pillow vulnerability and update pip/starlette
101-
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install --upgrade 'pillow==12.0.0' 'pip>=25.3' 'starlette>=0.49.1'
102-
RUN /opt/conda/bin/pip install --upgrade 'pillow==12.0.0' 'pip>=25.3' 'starlette>=0.49.1'
103-
RUN /opt/conda/envs/ptca/bin/pip install --upgrade 'pillow==12.0.0' 'pip>=25.3' 'starlette>=0.49.1'
102+
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install \
103+
--upgrade 'pillow==12.0.0' 'pip>=25.3' 'starlette>=0.49.1'
104+
RUN /opt/conda/bin/pip install \
105+
--upgrade 'pillow==12.0.0' 'pip>=25.3' 'starlette>=0.49.1'
106+
RUN /opt/conda/envs/ptca/bin/pip install \
107+
--upgrade 'pillow==12.0.0' 'pip>=25.3' 'starlette>=0.49.1'
104108

105109
# Upgrade torch, requests, urllib3 in the system Python for fixing vulnerability
106-
RUN /opt/conda/bin/pip install --upgrade 'urllib3==2.5.0'
107-
RUN /opt/conda/envs/ptca/bin/pip install --upgrade 'urllib3==2.5.0'
108-
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install --upgrade 'urllib3==2.5.0'
110+
RUN /opt/conda/bin/pip install \
111+
--upgrade 'urllib3==2.5.0'
112+
RUN /opt/conda/envs/ptca/bin/pip install \
113+
--upgrade 'urllib3==2.5.0'
114+
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install \
115+
--upgrade 'urllib3==2.5.0'
109116

110-
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install --force-reinstall --no-cache-dir 'torch==2.8.0' torchvision==0.23.0
111-
RUN /opt/conda/envs/ptca/bin/pip install --force-reinstall --no-cache-dir 'torch==2.8.0' torchvision==0.23.0
112-
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install --upgrade 'mlflow==3.1.4'
117+
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install \
118+
--force-reinstall --no-cache-dir 'torch==2.8.0' torchvision==0.23.0
119+
RUN /opt/conda/envs/ptca/bin/pip install \
120+
--force-reinstall --no-cache-dir 'torch==2.8.0' torchvision==0.23.0
121+
RUN /azureml-envs/azureml-automl-dnn-vision-gpu/bin/pip install \
122+
--upgrade 'mlflow==3.1.4'
113123

114-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'h2>=4.3.0'
124+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
125+
--upgrade 'h2>=4.3.0'
115126
RUN rm -rf /opt/conda/pkgs/
116127

117128
# end pip install

assets/training/automl/environments/ai-ml-automl-dnn/context/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ RUN pip install \
9090
# end pip install
9191

9292
# Fix vulnerabilities - upgrade pip, starlette, urllib3
93-
RUN pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0'
94-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'h2>=4.3.0'
93+
RUN pip install \
94+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'urllib3==2.5.0'
95+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
96+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'h2>=4.3.0'
9597
RUN rm -rf /opt/miniconda/pkgs/
9698

9799
ENV LD_LIBRARY_PATH=$AZUREML_CONDA_ENVIRONMENT_PATH/lib:$LD_LIBRARY_PATH

assets/training/automl/environments/ai-ml-automl-gpu/context/Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ RUN conda run -p $AZUREML_CONDA_ENVIRONMENT_PATH
5151
###############################
5252
# Pre-Build LightGBM
5353
###############################
54-
RUN pip install --upgrade lightgbm==4.6.0
54+
RUN pip install \
55+
--upgrade lightgbm==4.6.0
5556

5657
###############################
5758
# Install GPU LightGBM and XgBoost
5859
###############################
59-
RUN pip install --upgrade --force-reinstall xgboost==1.5.2 pandas==1.5.3
60+
RUN pip install \
61+
--upgrade --force-reinstall xgboost==1.5.2 pandas==1.5.3
6062

6163
# begin conda create
6264
# Create conda environment
@@ -101,11 +103,15 @@ RUN pip install \
101103
'certifi>=2025.11.12'
102104
# end pypi dependencies
103105

104-
RUN pip install --upgrade 'h2>=4.3.0'
106+
RUN pip install \
107+
--upgrade 'h2>=4.3.0'
105108
# Upgrade requests, urllib3, pip, starlette in all relevant Python environments to meet vulnerability requirements
106-
RUN pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'requests==2.32.5' 'urllib3==2.5.0' 'pillow==12.0.0' 'h2>=4.3.0'
107-
RUN /opt/miniconda/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'requests==2.32.5' 'urllib3==2.5.0' 'pillow==12.0.0' 'h2>=4.3.0'|| true
108-
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'requests==2.32.5' 'urllib3==2.5.0' 'pillow==12.0.0' 'h2>=4.3.0' || true
109+
RUN pip install \
110+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'requests==2.32.5' 'urllib3==2.5.0' 'pillow==12.0.0' 'h2>=4.3.0'
111+
RUN /opt/miniconda/bin/pip install \
112+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'requests==2.32.5' 'urllib3==2.5.0' 'pillow==12.0.0' 'h2>=4.3.0'|| true
113+
RUN $AZUREML_CONDA_ENVIRONMENT_PATH/bin/pip install \
114+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'requests==2.32.5' 'urllib3==2.5.0' 'pillow==12.0.0' 'h2>=4.3.0' || true
109115
RUN rm -rf /opt/miniconda/pkgs/
110116

111117
ENV LD_LIBRARY_PATH=$AZUREML_CONDA_ENVIRONMENT_PATH/lib:$LD_LIBRARY_PATH

assets/training/automl/environments/ai-ml-automl/context/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ RUN pip install \
7171

7272
# begin pip ad-hoc
7373
# Install pip ad-hoc dependencies for security updates
74-
RUN pip install --upgrade 'pip>=25.3' 'starlette>=0.49.1' 'pyarrow==14.0.2' 'urllib3==2.5.0'
74+
RUN pip install \
75+
--upgrade 'pip>=25.3' 'starlette>=0.49.1' 'pyarrow==14.0.2' 'urllib3==2.5.0'
7576
# end pip ad-hoc
7677

7778

0 commit comments

Comments
 (0)