Skip to content

Commit

Permalink
Updates usage of the DEBIAN_FRONTEND and TZ environment variables. Re…
Browse files Browse the repository at this point in the history
…moves the usage of the TZ variable, and moves the DEBIAN_FRONTEND to the RUN commands that need them.

fixes #5
  • Loading branch information
epaganon authored and prabhakk-mw committed Sep 26, 2024
1 parent d9f7123 commit ed8b605
Show file tree
Hide file tree
Showing 39 changed files with 242 additions and 248 deletions.
11 changes: 6 additions & 5 deletions matlab-deps/r2019b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Copyright 2020-2023 The MathWorks, Inc.
# Copyright 2020-2024 The MathWorks, Inc.

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

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

# 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.
Expand All @@ -14,8 +12,11 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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
Expand Down
21 changes: 11 additions & 10 deletions matlab-deps/r2019b/ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Copyright 2020-2021 The MathWorks, Inc.
# Copyright 2020-2024 The MathWorks, Inc.

FROM ubuntu:18.04

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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/*

# Uncomment the following RUN apt-get statement to install extended locale support for MATLAB
#RUN apt-get install -y locales locales-all
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y locales locales-all

# Uncomment the following RUN ln -s statement if you will be running the MATLAB
# license manager INSIDE the container.
Expand All @@ -22,18 +23,18 @@ RUN apt-get update && apt-get install --no-install-recommends -y `cat /tmp/base-
# code generation capabilities, or if you will be using mex with gcc, g++,
# or gfortran.
#
#RUN apt-get install -y gcc g++ gfortran
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y gcc g++ gfortran

# Uncomment the following RUN apt-get statement to enable running a program
# that makes use of MATLAB's Engine API for C and Fortran
# https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
#
#RUN apt-get install -y csh
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y csh

# Uncomment ALL of the following RUN apt-get statement to enable the playing of media files
# (mp3, mp4, etc.) from within MATLAB.
#
#RUN apt-get install -y libgstreamer1.0-0 \
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y libgstreamer1.0-0 \
# gstreamer1.0-tools \
# gstreamer1.0-libav \
# gstreamer1.0-plugins-base \
Expand All @@ -44,4 +45,4 @@ RUN apt-get update && apt-get install --no-install-recommends -y `cat /tmp/base-

# Uncomment the following RUN apt-get statement if you will be using the 32-bit tcc compiler
# used in the Polyspace product line.
#RUN apt-get install -y libc6-i386
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y libc6-i386
14 changes: 6 additions & 8 deletions matlab-deps/r2020a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Copyright 2020-2023 The MathWorks, Inc.
# Copyright 2020-2024 The MathWorks, Inc.

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

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

# 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.
Expand All @@ -14,15 +12,15 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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

# Set the timezone to avoid warnings in the logs when starting MATLAB
ENV TZ=UTC

# Create directories for the MATLAB install and for the JobStorageLocation
ENV JOB_STORAGE_LOCATION /usr/local/JobStorageLocation
ENV MATLAB_INSTALL_LOCATION /usr/local/matlab
Expand Down
21 changes: 11 additions & 10 deletions matlab-deps/r2020a/ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Copyright 2020-2021 The MathWorks, Inc.
# Copyright 2020-2024 The MathWorks, Inc.

FROM ubuntu:18.04

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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/*

# Uncomment the following RUN apt-get statement to install extended locale support for MATLAB
#RUN apt-get install -y locales locales-all
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y locales locales-all

# Uncomment the following RUN ln -s statement if you will be running the MATLAB
# license manager INSIDE the container.
Expand All @@ -22,18 +23,18 @@ RUN apt-get update && apt-get install --no-install-recommends -y `cat /tmp/base-
# code generation capabilities, or if you will be using mex with gcc, g++,
# or gfortran.
#
#RUN apt-get install -y gcc g++ gfortran
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y gcc g++ gfortran

# Uncomment the following RUN apt-get statement to enable running a program
# that makes use of MATLAB's Engine API for C and Fortran
# https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
#
#RUN apt-get install -y csh
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y csh

# Uncomment ALL of the following RUN apt-get statement to enable the playing of media files
# (mp3, mp4, etc.) from within MATLAB.
#
#RUN apt-get install -y libgstreamer1.0-0 \
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y libgstreamer1.0-0 \
# gstreamer1.0-tools \
# gstreamer1.0-libav \
# gstreamer1.0-plugins-base \
Expand All @@ -44,4 +45,4 @@ RUN apt-get update && apt-get install --no-install-recommends -y `cat /tmp/base-

# Uncomment the following RUN apt-get statement if you will be using the 32-bit tcc compiler
# used in the Polyspace product line.
#RUN apt-get install -y libc6-i386
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y libc6-i386
18 changes: 6 additions & 12 deletions matlab-deps/r2020b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Copyright 2020-2023 The MathWorks, Inc.
# Copyright 2020-2024 The MathWorks, Inc.

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

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

# 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.
Expand All @@ -14,25 +12,21 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*

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

# Set the timezone to avoid warnings in the logs when starting MATLAB
ENV TZ=UTC

# 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}

# Remove unneeded cache files
RUN apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# To avoid inadvertantly polluting the / directory, use the JobStorageLocation
# while running MATLAB.
WORKDIR ${JOB_STORAGE_LOCATION}
Expand Down
21 changes: 11 additions & 10 deletions matlab-deps/r2020b/ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
# Copyright 2020-2021 The MathWorks, Inc.
# Copyright 2020-2024 The MathWorks, Inc.

FROM ubuntu:20.04

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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/*

# Uncomment the following RUN apt-get statement if you will be using Simulink
# code generation capabilities, or if you will be compiling your own mex files
# with gcc, g++, or gfortran.
#
#RUN apt-get install -y gcc g++ gfortran
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y gcc g++ gfortran

# Uncomment the following RUN apt-get statement to enable running a program
# that makes use of MATLAB's Engine API for C and Fortran
# https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
#
#RUN apt-get install -y csh
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y csh

# Uncomment ALL of the following RUN apt-get statement to enable the playing of media files
# (mp3, mp4, etc.) from within MATLAB.
#
#RUN apt-get install --no-install-recommends -y libgstreamer1.0-0 \
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install --no-install-recommends -y libgstreamer1.0-0 \
# gstreamer1.0-tools \
# gstreamer1.0-libav \
# gstreamer1.0-plugins-base \
Expand All @@ -35,13 +36,13 @@ RUN apt-get update && apt-get install --no-install-recommends -y `cat /tmp/base-
# gstreamer1.0-plugins-ugly

# Uncomment the following line if you require the fuse filesystem
#RUN apt-get install --no-install-recommends -y libfuse2
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install --no-install-recommends -y libfuse2

# Uncomment the following line if you require network tools
# RUN apt-get install --no-install-recommends -y net-tools

# Uncomment the following line if you require firefox
#RUN apt-get install --no-install-recommends -y firefox
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get install --no-install-recommends -y firefox

# Uncomment to resolve any license manager issues
# RUN ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
11 changes: 6 additions & 5 deletions matlab-deps/r2021a/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Copyright 2021 The MathWorks, Inc.
# Copyright 2021-2024 The MathWorks, Inc.

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

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

# 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.
Expand All @@ -14,8 +12,11 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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
Expand Down
21 changes: 11 additions & 10 deletions matlab-deps/r2021a/ubuntu20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
# Copyright 2021 The MathWorks, Inc.
# Copyright 2021-2024 The MathWorks, Inc.

FROM ubuntu:20.04

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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/*

RUN [ -d /usr/share/X11/xkb ] || mkdir -p /usr/share/X11/xkb

# Uncomment the following RUN apt-get statement if you will be using Simulink
# code generation capabilities, or if you will be compiling your own mex files
# with gcc, g++, or gfortran.
#
#RUN apt-get update -y && apt-get install -y gcc g++ gfortran && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install -y gcc g++ gfortran && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# Uncomment the following RUN apt-get statement to enable running a program
# that makes use of MATLAB's Engine API for C and Fortran
# https://www.mathworks.com/help/matlab/matlab_external/introducing-matlab-engine.html
#
#RUN apt-get update -y && apt-get install -y csh && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install -y csh && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# Uncomment ALL of the following RUN apt-get statement to enable the playing of media files
# (mp3, mp4, etc.) from within MATLAB.
#
#RUN apt-get update -y && apt-get install --no-install-recommends -y libgstreamer1.0-0 \
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install --no-install-recommends -y libgstreamer1.0-0 \
# gstreamer1.0-tools \
# gstreamer1.0-libav \
# gstreamer1.0-plugins-base \
Expand All @@ -38,10 +39,10 @@ RUN [ -d /usr/share/X11/xkb ] || mkdir -p /usr/share/X11/xkb
# && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# Uncomment the following line if you require the fuse filesystem
#RUN apt-get update -y && apt-get install --no-install-recommends -y libfuse2 && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install --no-install-recommends -y libfuse2 && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# Uncomment the following line if you require firefox
#RUN apt-get update -y && apt-get install --no-install-recommends -y firefox && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
#RUN export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install --no-install-recommends -y firefox && apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# Uncomment to resolve license manager issues
#RUN ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
11 changes: 6 additions & 5 deletions matlab-deps/r2021b/aws-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Copyright 2021-2023 The MathWorks, Inc.
# Copyright 2021-2024 The MathWorks, Inc.

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

LABEL maintainer="The MathWorks, Inc."

ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"

# 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.
Expand All @@ -14,8 +12,11 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"
# unzip, zip - Used to stage input/output data.
COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN 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/*
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 patched glibc - See https://github.com/mathworks/build-glibc-bz-19329-patch
# Note: base-dependencies.txt includes libcrypt-dev and linux-libc-dev to enable installation of patched -dev packages
Expand Down
2 changes: 0 additions & 2 deletions matlab-deps/r2021b/ubi8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ FROM registry.access.redhat.com/ubi8/ubi:8.5-226

LABEL maintainer="The MathWorks, Inc."

ENV TZ="Etc/UTC"

COPY base-dependencies.txt /tmp/base-dependencies.txt

RUN yum update --disableplugin=subscription-manager -y \
Expand Down
Loading

0 comments on commit ed8b605

Please sign in to comment.