Docker learning and dev environment

(Frederick Kautz) #1

I’ve added a Dockerfile and submitted it in patch #11

It is paired up with a Makefile.

A few notes:

  • The image requires additional capabilities due to swift and lldb.
  • The image was not tested with reduced capabilities when using swift-jupyter. Maybe we can sacrifice swift cli repl for better security.
  • A makefile was included to help build and start the swiftai environment.
  • For now, this image uses the CPU images because GPU on docker requires the installation of docker-nvidia. I’m developing on an OSX laptop which has an AMD GPU, so… :stuck_out_tongue:. It would be good to get someone to contribute in this space since there is significant benefit. I personally will probably just skip directly to kubernetes w/GPU support since I have access to that, but that likely won’t help most users getting started.
# Default target builds docker image

# Start jupyter with S4TF support
make jupyter

# Start a shell
make shell

You’ll see something like this:

    To access the notebook, open this file in a browser:
    Or copy and paste one of these URLs:

Copy and paste the (IPv4) version to your browser and have fun!