diff --git a/test/test_artifacts/v1/keras.test.Dockerfile b/test/test_artifacts/v1/keras.test.Dockerfile index b7bc892b..f5cb224f 100644 --- a/test/test_artifacts/v1/keras.test.Dockerfile +++ b/test/test_artifacts/v1/keras.test.Dockerfile @@ -8,7 +8,7 @@ RUN sudo apt-get update && sudo apt-get install -y git graphviz && \ : # Some of the keras guides requires pydot and graphviz to be installed -RUN micromamba install -y --freeze-installed conda-forge::pydot nvidia::cuda-nvcc +RUN micromamba install -y --freeze-installed conda-forge::pydot "nvidia::cuda-nvcc>=11.8,<11.9" ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/opt/conda WORKDIR "keras-io/guides" @@ -22,4 +22,3 @@ COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/run_keras_tests.sh . RUN chmod +x run_keras_tests.sh # Run tests in run_keras_tests.sh CMD ["./run_keras_tests.sh"] - diff --git a/test/test_artifacts/v1/pytorch.examples.Dockerfile b/test/test_artifacts/v1/pytorch.examples.Dockerfile index d9a42c7a..f2c3231a 100644 --- a/test/test_artifacts/v1/pytorch.examples.Dockerfile +++ b/test/test_artifacts/v1/pytorch.examples.Dockerfile @@ -2,10 +2,11 @@ ARG SAGEMAKER_DISTRIBUTION_IMAGE FROM $SAGEMAKER_DISTRIBUTION_IMAGE ARG MAMBA_DOCKERFILE_ACTIVATE=1 -RUN sudo apt-get update && \ - sudo apt-get install -y git && \ - git clone --recursive https://github.com/pytorch/examples && \ - : +RUN git clone --recursive https://github.com/pytorch/examples + +# During automation some tests fails with `libcuda.so: cannot open shared object file: No such file or directory` +# But libcuda.so.1 exists. Adding this resolves, but also adding `2>/dev/null` to ignore if not needed. +RUN sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu/libcuda.so 2>/dev/null WORKDIR "examples" diff --git a/test/test_artifacts/v1/scripts/run_autogluon_tests.sh b/test/test_artifacts/v1/scripts/run_autogluon_tests.sh index 036d1432..ea68f6a4 100644 --- a/test/test_artifacts/v1/scripts/run_autogluon_tests.sh +++ b/test/test_artifacts/v1/scripts/run_autogluon_tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -AUTOGLUON_VERSION=$(micromamba list | grep autogluon | tr -s ' ' | cut -d ' ' -f 3) +AUTOGLUON_VERSION=$(micromamba list | grep autogluon | tr -s ' ' | head -n 1 | cut -d ' ' -f 3) git checkout tags/v$AUTOGLUON_VERSION # Run autogluon quick start as end-to-end check diff --git a/test/test_artifacts/v1/sm-python-sdk.test.Dockerfile b/test/test_artifacts/v1/sm-python-sdk.test.Dockerfile index 1e9426d1..623efbf6 100644 --- a/test/test_artifacts/v1/sm-python-sdk.test.Dockerfile +++ b/test/test_artifacts/v1/sm-python-sdk.test.Dockerfile @@ -2,9 +2,8 @@ ARG SAGEMAKER_DISTRIBUTION_IMAGE FROM $SAGEMAKER_DISTRIBUTION_IMAGE ARG MAMBA_DOCKERFILE_ACTIVATE=1 -RUN sudo apt-get update && sudo apt-get install -y git && \ - git clone --recursive https://github.com/aws/sagemaker-python-sdk.git && \ - : +RUN git clone --recursive https://github.com/aws/sagemaker-python-sdk.git + # Sagemaker Python SDK's unit tests requires AWS_DEFAULT_REGION to be set. So, using an arbitrary value of us-east-1 ENV AWS_DEFAULT_REGION=us-east-1 WORKDIR "sagemaker-python-sdk" diff --git a/test/test_dockerfile_based_harness.py b/test/test_dockerfile_based_harness.py index b3dca6d1..69f81a6b 100644 --- a/test/test_dockerfile_based_harness.py +++ b/test/test_dockerfile_based_harness.py @@ -130,7 +130,7 @@ def _validate_docker_images(dockerfile_path: str, required_packages: List[str], try: image, _ = _docker_client.images.build(path=test_artifacts_path, - dockerfile=dockerfile_path, + dockerfile=dockerfile_path, shmsize='256000000', tag=dockerfile_path.lower().replace('.', '-'), rm=True, buildargs={'SAGEMAKER_DISTRIBUTION_IMAGE': docker_image_identifier}) except BuildError as e: