Cannot build Docker image on MacOS

As per instructions from the Deploying a Deep Learning Model with Docker
lab, I am trying to create a Docker image using the following command:

docker build -t w1_lab .

I am doing this from the directory that contains the unzipped files. When I run the command, however, I get a series of errors (screenshot below) and image creation fails. Why is this happening?
PS. I am using MacOS.

your error is stating one of the directory file hdf5 is not install properly as it is dependency libhdf5 which is a shared object file, is not found in your system.

Did you download all the metadata files required you run the docker build?

Do you mean the provided zipfile (mlepc1w1_cloud.zip)? If so, yes, I downloaded & unzipped it, and then ran code from the unzipped directory.

If not, I’m not sure what metadata files are needed?

I had the same issue. Add the code snippet below to the dockerfile. Place it after # base image and before # specify working directory and it should work.

# Install HDF5 library
RUN apt-get update && apt-get install -y \
    libhdf5-dev \
    && rm -rf /var/lib/apt/lists/*