Skip to content

Commit b278304

Browse files
TRNWWZRuinong Tian
andauthored
Move dependencies with pinned version out of env.in files (#571)
Co-authored-by: Ruinong Tian <[email protected]>
1 parent 5d4ed45 commit b278304

32 files changed

+98
-69
lines changed

.github/workflows/PR_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
This pull request was created by GitHub Actions/AWS CodeBuild! Before merging, please do the following:
22
- [ ] Review changelog/staleness report.
3-
- [ ] (Only for Minor/Major version releases) Review python package dependency and size report.
3+
- [ ] Review pinned_env.in files, when releasing Major/Minor version, try removing entries from there and build images.
4+
- [ ] Review python package dependency and size report.
45
- [ ] Review build/test results by clicking *Build Logs* in CI Report (be patient, tests take ~4hr).
56
- [ ] Review ECR Scan results.

build_artifacts/v1/v1.12/v1.12.2/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM mambaorg/micromamba:$TAG_FOR_BASE_MICROMAMBA_IMAGE
33

44
ARG CUDA_MAJOR_MINOR_VERSION=''
55
ARG ENV_IN_FILENAME
6+
ARG PINNED_ENV_IN_FILENAME
67
ARG ARG_BASED_ENV_IN_FILENAME
78
ARG IMAGE_VERSION
89

@@ -84,16 +85,17 @@ RUN mkdir -p /etc/code-editor/extensions && \
8485

8586
USER $MAMBA_USER
8687
COPY --chown=$MAMBA_USER:$MAMBA_USER $ENV_IN_FILENAME *.in /tmp/
88+
COPY --chown=$MAMBA_USER:$MAMBA_USER $PINNED_ENV_IN_FILENAME *.in /tmp/
8789

88-
# Make sure that $ENV_IN_FILENAME has a newline at the end before the `tee` command runs. Otherwise, nasty things
89-
# will happen.
90+
# Make sure that $ENV_IN_FILENAME and $PINNED_ENV_IN_FILENAME has a newline at the end before the `tee` command runs.
91+
# Otherwise, nasty things will happen.
9092
RUN if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
9193
then echo 'No ARG_BASED_ENV_IN_FILENAME passed' ; \
9294
else envsubst < /tmp/$ARG_BASED_ENV_IN_FILENAME | tee --append /tmp/$ENV_IN_FILENAME ; \
9395
fi
9496

9597
ARG CONDA_OVERRIDE_CUDA=$CUDA_MAJOR_MINOR_VERSION
96-
RUN micromamba install -y --name base --file /tmp/$ENV_IN_FILENAME && \
98+
RUN micromamba install -y --name base --file /tmp/$ENV_IN_FILENAME --file /tmp/$PINNED_ENV_IN_FILENAME && \
9799
micromamba clean --all --yes --force-pkgs-dirs && \
98100
rm -rf /tmp/*.in
99101

build_artifacts/v1/v1.12/v1.12.2/cpu.env.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,3 @@ conda-forge::sasl[version='>=0.3.1,<0.4.0']
5252
conda-forge::thrift_sasl[version='>=0.4.3,<0.5.0']
5353
conda-forge::pyhive[version='>=0.7.0,<0.8.0']
5454
conda-forge::python-gssapi[version='>=1.9.0,<1.10.0']
55-
conda-forge::libmamba[version='<2.0.0']
56-
conda-forge::evaluate[version='<0.4.2']
57-
conda-forge::catboost[version='>=1.1.1,<1.3.0',build='*cpu*']
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
conda-forge::libmamba[version='>=1.5.11,<1.6.0']
2+
conda-forge::evaluate[version='<0.4.2']
3+
conda-forge::catboost[version='>=1.1.1,<1.3.0',build='*cpu*']

build_artifacts/v1/v1.12/v1.12.2/gpu.env.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,3 @@ conda-forge::sasl[version='>=0.3.1,<0.4.0']
5252
conda-forge::thrift_sasl[version='>=0.4.3,<0.5.0']
5353
conda-forge::pyhive[version='>=0.7.0,<0.8.0']
5454
conda-forge::python-gssapi[version='>=1.9.0,<1.10.0']
55-
conda-forge::pyarrow-hotfix[version='>=0.6,<0.7.0']
56-
conda-forge::libmamba[version='<2.0.0']
57-
conda-forge::evaluate[version='<0.4.2']
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
conda-forge::libmamba[version='>=1.5.11,<1.6.0']
2+
conda-forge::evaluate[version='<0.4.2']
3+
conda-forge::pyarrow-hotfix[version='>=0.6,<0.7.0']

build_artifacts/v2/v2.1/v2.1.2/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM mambaorg/micromamba:$TAG_FOR_BASE_MICROMAMBA_IMAGE
33

44
ARG CUDA_MAJOR_MINOR_VERSION=''
55
ARG ENV_IN_FILENAME
6+
ARG PINNED_ENV_IN_FILENAME
67
ARG ARG_BASED_ENV_IN_FILENAME
78
ARG IMAGE_VERSION
89
LABEL "org.amazon.sagemaker-distribution.image.version"=$IMAGE_VERSION
@@ -68,17 +69,18 @@ RUN rsync -a ${DIRECTORY_TREE_STAGE_DIR}/ / && \
6869

6970
USER $MAMBA_USER
7071
COPY --chown=$MAMBA_USER:$MAMBA_USER $ENV_IN_FILENAME *.in /tmp/
72+
COPY --chown=$MAMBA_USER:$MAMBA_USER $PINNED_ENV_IN_FILENAME *.in /tmp/
7173
ARG MAMBA_DOCKERFILE_ACTIVATE=1
7274
ARG CONDA_OVERRIDE_CUDA=$CUDA_MAJOR_MINOR_VERSION
7375

74-
# Make sure that $ENV_IN_FILENAME has a newline at the end before the `tee` command runs. Otherwise, nasty things
75-
# will happen.
76+
# Make sure that $ENV_IN_FILENAME and $PINNED_ENV_IN_FILENAME has a newline at the end before the `tee` command runs.
77+
# Otherwise, nasty things will happen.
7678
RUN if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
7779
then echo 'No ARG_BASED_ENV_IN_FILENAME passed' ; \
7880
else envsubst < /tmp/$ARG_BASED_ENV_IN_FILENAME | tee --append /tmp/$ENV_IN_FILENAME ; \
7981
fi && \
8082
# Enforce dependencies are all installed from conda-forge
81-
micromamba install -y --name base --file /tmp/$ENV_IN_FILENAME && \
83+
micromamba install -y --name base --file /tmp/$ENV_IN_FILENAME --file /tmp/$PINNED_ENV_IN_FILENAME && \
8284
micromamba clean --all --yes --force-pkgs-dirs && \
8385
rm -rf /tmp/*.in && \
8486
sudo ln -s $(which python3) /usr/bin/python && \

build_artifacts/v2/v2.1/v2.1.2/cpu.env.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ conda-forge::boto3[version='>=1.34.162,<1.35.0']
3434
conda-forge::sagemaker-python-sdk[version='>=2.227.0,<2.228.0']
3535
conda-forge::supervisor[version='>=4.2.5,<4.3.0']
3636
conda-forge::autogluon[version='>=1.1.1,<1.2.0']
37-
conda-forge::catboost[version='>=1.1.1,<1.3.0',build='*cpu*']
3837
conda-forge::aws-glue-sessions[version='>=1.0.8,<1.1.0']
3938
conda-forge::sagemaker-kernel-wrapper[version='>=0.0.4,<0.1.0']
4039
conda-forge::jupyter-ai[version='>=2.25.0,<2.26.0']
@@ -55,7 +54,3 @@ conda-forge::pyhive[version='>=0.7.0,<0.8.0']
5554
conda-forge::python-gssapi[version='>=1.9.0,<1.10.0']
5655
conda-forge::tf-keras[version='>=2.17.0,<2.18.0']
5756
conda-forge::git-remote-codecommit[version='>=1.16,<1.17.0']
58-
conda-forge::sentencepiece[version='>=0.1.99,<0.2.0']
59-
conda-forge::evaluate[version='<=0.4.1']
60-
conda-forge::libmamba[version='<2.0.0']
61-
conda-forge::dash[version='2.18.1']
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
conda-forge::libmamba[version='>=1.5.11,<1.6.0']
2+
conda-forge::dash[version='<=2.18.1']
3+
conda-forge::evaluate[version='<0.4.2']
4+
conda-forge::catboost[version='>=1.1.1,<1.3.0',build='*cpu*']
5+
conda-forge::sentencepiece[version='>=0.1.99,<0.2.0']

build_artifacts/v2/v2.1/v2.1.2/gpu.env.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,3 @@ conda-forge::pyhive[version='>=0.7.0,<0.8.0']
5454
conda-forge::python-gssapi[version='>=1.9.0,<1.10.0']
5555
conda-forge::tf-keras[version='>=2.17.0,<2.18.0']
5656
conda-forge::git-remote-codecommit[version='>=1.16,<1.17.0']
57-
conda-forge::sentencepiece[version='>=0.1.99,<0.2.0']
58-
conda-forge::evaluate[version='<=0.4.1']
59-
conda-forge::libmamba[version='<2.0.0']
60-
conda-forge::dash[version='2.18.1']

0 commit comments

Comments
 (0)