Skip to content

Commit

Permalink
Add upgrade to aws-batch dockerfiles to ensure that the latest packag…
Browse files Browse the repository at this point in the history
…es are always pulled in.

This is required as the base layer here does not update itself often.
  • Loading branch information
mwthomash authored and prabhakk-mw committed Mar 3, 2025
1 parent 50e9075 commit 777f252
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 81 deletions.
3 changes: 2 additions & 1 deletion matlab-deps/r2019b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2024 The MathWorks, Inc.
# Copyright 2020-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu18.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2020a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2024 The MathWorks, Inc.
# Copyright 2020-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu18.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
73 changes: 37 additions & 36 deletions matlab-deps/r2020b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# Copyright 2020-2024 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

LABEL maintainer="The MathWorks, Inc."

# base-dependencies.txt lists libraries required by MATLAB, except for:
# csh - Support MATLAB's Engine API for C and Fortran. See https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
# gcc, g++, gfortran - Support Simulink code generation and mex with gcc, g++, or gfortran.
# locales, locales-all - Provide extended locales support
# python3, python3-pip - Python and pip are to run/install the AWS CLI.
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

# Install the AWS CLI to use for staging input and output data
RUN pip3 install awscli

# Create directories for the MATLAB install and for the JobStorageLocation
ENV JOB_STORAGE_LOCATION /usr/local/JobStorageLocation
ENV MATLAB_INSTALL_LOCATION /usr/local/matlab
RUN mkdir -p ${MATLAB_INSTALL_LOCATION} ${JOB_STORAGE_LOCATION}
RUN chmod -R +wx ${JOB_STORAGE_LOCATION}

# To avoid inadvertantly polluting the / directory, use the JobStorageLocation
# while running MATLAB.
WORKDIR ${JOB_STORAGE_LOCATION}

COPY stageDataAndRunJob.sh /usr/local/stageDataAndRunJob.sh
RUN chmod +x /usr/local/stageDataAndRunJob.sh
ENTRYPOINT ["/usr/local/stageDataAndRunJob.sh"]
# Copyright 2020-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

LABEL maintainer="The MathWorks, Inc."

# base-dependencies.txt lists libraries required by MATLAB, except for:
# csh - Support MATLAB's Engine API for C and Fortran. See https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
# gcc, g++, gfortran - Support Simulink code generation and mex with gcc, g++, or gfortran.
# locales, locales-all - Provide extended locales support
# python3, python3-pip - Python and pip are to run/install the AWS CLI.
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

# Install the AWS CLI to use for staging input and output data
RUN pip3 install awscli

# Create directories for the MATLAB install and for the JobStorageLocation
ENV JOB_STORAGE_LOCATION /usr/local/JobStorageLocation
ENV MATLAB_INSTALL_LOCATION /usr/local/matlab
RUN mkdir -p ${MATLAB_INSTALL_LOCATION} ${JOB_STORAGE_LOCATION}
RUN chmod -R +wx ${JOB_STORAGE_LOCATION}

# To avoid inadvertantly polluting the / directory, use the JobStorageLocation
# while running MATLAB.
WORKDIR ${JOB_STORAGE_LOCATION}

COPY stageDataAndRunJob.sh /usr/local/stageDataAndRunJob.sh
RUN chmod +x /usr/local/stageDataAndRunJob.sh
ENTRYPOINT ["/usr/local/stageDataAndRunJob.sh"]
73 changes: 37 additions & 36 deletions matlab-deps/r2021a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# Copyright 2021-2024 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

LABEL maintainer="The MathWorks, Inc."

# base-dependencies.txt lists libraries required by MATLAB, except for:
# csh - Support MATLAB's Engine API for C and Fortran. See https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
# gcc, g++, gfortran - Support Simulink code generation and mex with gcc, g++, or gfortran.
# locales, locales-all - Provide extended locales support
# python3, python3-pip - Python and pip are to run/install the AWS CLI.
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

# Install the AWS CLI to use for staging input and output data
RUN pip3 install awscli

# Create directories for the MATLAB install and for the JobStorageLocation
ENV JOB_STORAGE_LOCATION /usr/local/JobStorageLocation
ENV MATLAB_INSTALL_LOCATION /usr/local/matlab
RUN mkdir -p ${MATLAB_INSTALL_LOCATION} ${JOB_STORAGE_LOCATION}
RUN chmod -R +wx ${JOB_STORAGE_LOCATION}

# To avoid inadvertantly polluting the / directory, use the JobStorageLocation
# while running MATLAB.
WORKDIR ${JOB_STORAGE_LOCATION}

COPY stageDataAndRunJob.sh /usr/local/stageDataAndRunJob.sh
RUN chmod +x /usr/local/stageDataAndRunJob.sh
ENTRYPOINT ["/usr/local/stageDataAndRunJob.sh"]
# Copyright 2021-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

LABEL maintainer="The MathWorks, Inc."

# base-dependencies.txt lists libraries required by MATLAB, except for:
# csh - Support MATLAB's Engine API for C and Fortran. See https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
# gcc, g++, gfortran - Support Simulink code generation and mex with gcc, g++, or gfortran.
# locales, locales-all - Provide extended locales support
# python3, python3-pip - Python and pip are to run/install the AWS CLI.
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

# Install the AWS CLI to use for staging input and output data
RUN pip3 install awscli

# Create directories for the MATLAB install and for the JobStorageLocation
ENV JOB_STORAGE_LOCATION /usr/local/JobStorageLocation
ENV MATLAB_INSTALL_LOCATION /usr/local/matlab
RUN mkdir -p ${MATLAB_INSTALL_LOCATION} ${JOB_STORAGE_LOCATION}
RUN chmod -R +wx ${JOB_STORAGE_LOCATION}

# To avoid inadvertantly polluting the / directory, use the JobStorageLocation
# while running MATLAB.
WORKDIR ${JOB_STORAGE_LOCATION}

COPY stageDataAndRunJob.sh /usr/local/stageDataAndRunJob.sh
RUN chmod +x /usr/local/stageDataAndRunJob.sh
ENTRYPOINT ["/usr/local/stageDataAndRunJob.sh"]
3 changes: 2 additions & 1 deletion matlab-deps/r2021b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2024 The MathWorks, Inc.
# Copyright 2021-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2022a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2024 The MathWorks, Inc.
# Copyright 2021-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2022b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2024 The MathWorks, Inc.
# Copyright 2021-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2023a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023-2024 The MathWorks, Inc.
# Copyright 2023-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu20.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2023b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023-2024 The MathWorks, Inc.
# Copyright 2023-2025 The MathWorks, Inc.

FROM nvidia/cuda:11.8.0-base-ubuntu22.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2024a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 The MathWorks, Inc.
# Copyright 2024-2025 The MathWorks, Inc.

FROM nvidia/cuda:12.2.2-base-ubuntu22.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 2 additions & 1 deletion matlab-deps/r2024b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 The MathWorks, Inc.
# Copyright 2024-2025 The MathWorks, Inc.

FROM nvidia/cuda:12.2.2-base-ubuntu22.04

Expand All @@ -14,6 +14,7 @@ COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y `cat /tmp/base-dependencies.txt` \
&& apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit 777f252

Please sign in to comment.