How to do it...

  1. Let's define a run script and a Dockerfile for our environment. First, let's check out the basic structure of the Dockerfile:
FROM base_image
RUN pip3 install ipython
ADD . /

Save this file to a named text file called Dockerfile.

  1. Next, we will want to develop a run shell script to simplify running the script during development. Here's the basic structure of the shell script:
#/bin/bash
  1. Build the Docker container:
nvidia-docker build -t ch3 
  1. Allow the Docker container to produce windows outside of the container:
xhost +
  1. Now, run the container with the training script:
docker run -it 
--runtime=nvidia
--rm
-e DISPLAY=$DISPLAY
-v /tmp/.X11-unix:/tmp/.X11-unix
-v /home/jk/Desktop/book_repos/Chapter3/full-gan/data:/data
ch3 python3 train.py

These are all the tools we will need to run our training code for the GAN. Let's discuss the details of each of the lines in these two important pieces!

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

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