Creating the Docker container

This is how to create the Docker container for this chapter:

  1. Create a file under the docker folder called Dockerfile and place the following text into the file:
FROM base_image
This simply inherits from our base image that we built all the way back in Chapter 2, Data First, Easy Environment, and Data Prep.
  1. Install the graphing utilities and the Kaggle API among other needed libraries:
# Installations for graphing and analysis
RUN apt update && apt install -y python3-pydot python-pydot-ng graphviz
RUN pip3 install kaggle ipython pillow
  1. In Chapter 7, Using Simulated Images To Create Photo-Realistic Eyeballs with SimGAN, we learned how to get kaggle.json—use the same file here (placed in the docker folder) and copy it into the container:
# Copy Kaggle.json
COPY kaggle.json /root/.kaggle/kaggle.json
  1. We're going to download a dataset called the 3D MNIST dataset—this is simply a dataset that contains 3D models of MNIST in voxelized or point cloud format:
# Download the Data
RUN kaggle datasets download -d daavoo/3d-mnist

  1. Unzip the dataset into a folder called 3d-mnist inside the container and remove the ZIP file to save space:
RUN unzip 3d-mnist.zip -d 3d-mnist
RUN rm 3d-mnist.zip
  1. Set the working directory that we'll start the container in at the src folder level:
WORKDIR /src

After finishing this file, we'll create a few shell scripts to allow us to build, clean, and work with this new environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.151.164